@chainstream-io/centrifuge 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/centrifuge.d.ts +10 -0
- package/build/index.js +35 -4
- package/build/index.mjs +35 -4
- package/build/protobuf/centrifuge.d.ts +10 -0
- package/build/protobuf/index.js +35 -4
- package/build/protobuf/index.mjs +35 -4
- package/build/protobuf/types.d.ts +3 -0
- package/build/types.d.ts +3 -0
- package/dist/centrifuge.js +2 -2
- package/dist/centrifuge.js.map +3 -3
- package/dist/centrifuge.protobuf.js +5 -5
- package/dist/centrifuge.protobuf.js.map +3 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../node_modules/events/events.js", "../node_modules/@protobufjs/aspromise/index.js", "../node_modules/@protobufjs/base64/index.js", "../node_modules/@protobufjs/eventemitter/index.js", "../node_modules/@protobufjs/float/index.js", "../node_modules/@protobufjs/inquire/index.js", "../node_modules/@protobufjs/utf8/index.js", "../node_modules/@protobufjs/pool/index.js", "../node_modules/protobufjs/src/util/longbits.js", "../node_modules/protobufjs/src/util/minimal.js", "../node_modules/protobufjs/src/writer.js", "../node_modules/protobufjs/src/writer_buffer.js", "../node_modules/protobufjs/src/reader.js", "../node_modules/protobufjs/src/reader_buffer.js", "../node_modules/protobufjs/src/rpc/service.js", "../node_modules/protobufjs/src/rpc.js", "../node_modules/protobufjs/src/roots.js", "../node_modules/protobufjs/src/index-minimal.js", "../node_modules/protobufjs/minimal.js", "../src/subscription.ts", "../src/types.ts", "../src/utils.ts", "../src/transport_sockjs.ts", "../src/transport_websocket.ts", "../src/transport_http_stream.ts", "../src/transport_sse.ts", "../src/transport_webtransport.ts", "../src/fossil.ts", "../src/json.ts", "../src/centrifuge.ts", "../src/protobuf.codec.ts", "../src/client_proto.js", "../src/browser.protobuf.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n", "\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.<string,*>}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n", "\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor<Buffer>}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor<Uint8Array>}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor<Long>}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.<string,*>} dst Destination object\n * @param {Object.<string,*>} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.<string,*>} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor<Error>} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message<T>\n * @constructor\n * @param {string} message Error message\n * @param {Object.<string,*>} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message<T>}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n", "\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n", "\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n", "\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n", "\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n", "\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method\n * @param {Constructor<TReq>} requestCtor Request constructor\n * @param {Constructor<TRes>} responseCtor Response constructor\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n", "\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n", "\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.<string,Root>}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n", "\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n", "// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n", "import EventEmitter from 'events';\nimport { Centrifuge, UnauthorizedError } from './centrifuge';\nimport { errorCodes, unsubscribedCodes, subscribingCodes, connectingCodes } from './codes';\nimport {\n HistoryOptions, HistoryResult, PresenceResult, PresenceStatsResult,\n PublishResult, State, SubscriptionEvents, SubscriptionOptions,\n SubscriptionState, SubscriptionTokenContext, TypedEventEmitter,\n SubscriptionDataContext\n} from './types';\nimport { ttlMilliseconds, backoff } from './utils';\n\n/** Subscription to a channel */\nexport class Subscription extends (EventEmitter as new () => TypedEventEmitter<SubscriptionEvents>) {\n channel: string;\n state: SubscriptionState;\n\n private _centrifuge: Centrifuge;\n private _promises: Record<number, any>;\n private _resubscribeTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _refreshTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _getToken: null | ((ctx: SubscriptionTokenContext) => Promise<string>);\n private _minResubscribeDelay: number;\n private _maxResubscribeDelay: number;\n private _recover: boolean;\n private _offset: number | null;\n private _epoch: string | null;\n private _resubscribeAttempts: number;\n private _promiseId: number;\n private _delta: string;\n private _delta_negotiated: boolean;\n private _token: string;\n private _data: any | null;\n private _getData: null | ((ctx: SubscriptionDataContext) => Promise<any>);\n private _recoverable: boolean;\n private _positioned: boolean;\n private _joinLeave: boolean;\n private _filter: string;\n // @ts-ignore \u2013 this is used by a client in centrifuge.ts.\n private _inflight: boolean;\n private _prevValue: any;\n private _unsubPromise: any;\n\n /** Subscription constructor should not be used directly, create subscriptions using Client method. */\n constructor(centrifuge: Centrifuge, channel: string, options?: Partial<SubscriptionOptions>) {\n super();\n this.channel = channel;\n this.state = SubscriptionState.Unsubscribed;\n this._centrifuge = centrifuge;\n this._token = '';\n this._getToken = null;\n this._data = null;\n this._getData = null;\n this._recover = false;\n this._offset = null;\n this._epoch = null;\n this._recoverable = false;\n this._positioned = false;\n this._joinLeave = false;\n this._filter = '';\n this._minResubscribeDelay = 500;\n this._maxResubscribeDelay = 20000;\n this._resubscribeTimeout = null;\n this._resubscribeAttempts = 0;\n this._promises = {};\n this._promiseId = 0;\n this._inflight = false;\n this._refreshTimeout = null;\n this._delta = '';\n this._delta_negotiated = false;\n this._prevValue = null;\n this._unsubPromise = Promise.resolve();\n this._setOptions(options);\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n if (this._centrifuge._debugEnabled) {\n this.on('state', (ctx) => {\n this._debug('subscription state', channel, ctx.oldState, '->', ctx.newState);\n });\n this.on('error', (ctx) => {\n this._debug('subscription error', channel, ctx);\n });\n } else {\n // Avoid unhandled exception in EventEmitter for non-set error handler.\n this.on('error', function () { Function.prototype(); });\n }\n }\n\n /** ready returns a Promise which resolves upon subscription goes to Subscribed \n * state and rejects in case of subscription goes to Unsubscribed state. \n * Optional timeout can be passed.*/\n ready(timeout?: number): Promise<void> {\n if (this.state === SubscriptionState.Unsubscribed) {\n return Promise.reject({ code: errorCodes.subscriptionUnsubscribed, message: this.state });\n }\n if (this.state === SubscriptionState.Subscribed) {\n return Promise.resolve();\n }\n return new Promise((res, rej) => {\n const ctx: any = {\n resolve: res,\n reject: rej\n };\n if (timeout) {\n ctx.timeout = setTimeout(function () {\n rej({ code: errorCodes.timeout, message: 'timeout' });\n }, timeout);\n }\n this._promises[this._nextPromiseId()] = ctx;\n });\n }\n\n /** subscribe to a channel.*/\n subscribe() {\n if (this._isSubscribed()) {\n return;\n }\n this._resubscribeAttempts = 0;\n this._setSubscribing(subscribingCodes.subscribeCalled, 'subscribe called');\n }\n\n /** unsubscribe from a channel, keeping position state.*/\n unsubscribe() {\n this._unsubPromise = this._setUnsubscribed(unsubscribedCodes.unsubscribeCalled, 'unsubscribe called', true);\n }\n\n /** publish data to a channel.*/\n async publish(data: any): Promise<PublishResult> {\n await this._methodCall();\n return this._centrifuge.publish(this.channel, data);\n }\n\n /** get online presence for a channel.*/\n async presence(): Promise<PresenceResult> {\n await this._methodCall();\n return this._centrifuge.presence(this.channel);\n }\n\n /** presence stats for a channel (num clients and unique users).*/\n async presenceStats(): Promise<PresenceStatsResult> {\n await this._methodCall();\n return this._centrifuge.presenceStats(this.channel);\n }\n\n /** history for a channel. By default it does not return publications (only current\n * StreamPosition data) \u2013 provide an explicit limit > 0 to load publications.*/\n async history(opts: HistoryOptions): Promise<HistoryResult> {\n await this._methodCall();\n return this._centrifuge.history(this.channel, opts);\n }\n\n private _methodCall(): Promise<void> {\n if (this._isSubscribed()) {\n return Promise.resolve();\n }\n\n if (this._isUnsubscribed()) {\n return Promise.reject({\n code: errorCodes.subscriptionUnsubscribed,\n message: this.state\n });\n }\n\n return new Promise((resolve, reject) => {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n const timeoutDuration = this._centrifuge._config.timeout;\n\n const timeout = setTimeout(() => {\n reject({ code: errorCodes.timeout, message: 'timeout' });\n }, timeoutDuration);\n\n this._promises[this._nextPromiseId()] = {\n timeout,\n resolve,\n reject\n };\n });\n }\n\n private _nextPromiseId() {\n return ++this._promiseId;\n }\n\n private _needRecover() {\n return this._recover === true;\n }\n\n private _isUnsubscribed() {\n return this.state === SubscriptionState.Unsubscribed;\n }\n\n private _isSubscribing() {\n return this.state === SubscriptionState.Subscribing;\n }\n\n private _isSubscribed() {\n return this.state === SubscriptionState.Subscribed;\n }\n\n private _setState(newState: SubscriptionState) {\n if (this.state !== newState) {\n const oldState = this.state;\n this.state = newState;\n this.emit('state', { newState, oldState, channel: this.channel });\n return true;\n }\n return false;\n }\n\n private _usesToken(): boolean {\n return this._token !== '' || this._getToken !== null;\n }\n\n private _clearSubscribingState() {\n this._resubscribeAttempts = 0;\n this._clearResubscribeTimeout();\n }\n\n private _clearSubscribedState() {\n this._clearRefreshTimeout();\n }\n\n private _setSubscribed(result: any) {\n if (!this._isSubscribing()) {\n return;\n }\n this._clearSubscribingState();\n\n if (result.recoverable) {\n this._recover = true;\n this._offset = result.offset || 0;\n this._epoch = result.epoch || '';\n }\n if (result.delta) {\n this._delta_negotiated = true;\n } else {\n this._delta_negotiated = false;\n }\n\n this._setState(SubscriptionState.Subscribed);\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const ctx = this._centrifuge._getSubscribeContext(this.channel, result);\n this.emit('subscribed', ctx);\n this._resolvePromises();\n\n const pubs = result.publications;\n if (pubs && pubs.length > 0) {\n for (const i in pubs) {\n if (!pubs.hasOwnProperty(i)) {\n continue;\n }\n this._handlePublication(pubs[i]);\n }\n }\n\n if (result.expires === true) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private async _setSubscribing(code: number, reason: string) {\n if (this._isSubscribing()) {\n return;\n }\n if (this._isSubscribed()) {\n this._clearSubscribedState();\n }\n if (this._setState(SubscriptionState.Subscribing)) {\n this.emit('subscribing', { channel: this.channel, code: code, reason: reason });\n }\n // @ts-ignore \u2013 for performance reasons only await _unsubPromise for emulution case where it's required.\n if (this._centrifuge._transport && this._centrifuge._transport.emulation()) {\n await this._unsubPromise;\n }\n if (!this._isSubscribing()) {\n return;\n }\n this._subscribe();\n }\n\n private _subscribe(): any {\n this._debug('subscribing on', this.channel);\n\n if (!this._isTransportOpen()) {\n this._debug('delay subscribe on', this.channel, 'till connected');\n return null;\n }\n\n if (this._inflight) {\n return null;\n }\n this._inflight = true;\n\n if (this._canSubscribeWithoutGettingToken()) {\n return this._subscribeWithoutToken();\n }\n\n this._getSubscriptionToken()\n .then(token => this._handleTokenResponse(token))\n .catch(e => this._handleTokenError(e));\n\n return null;\n }\n\n private _isTransportOpen(): boolean {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n return this._centrifuge._transportIsOpen;\n }\n\n private _canSubscribeWithoutGettingToken(): boolean {\n return !this._usesToken() || !!this._token;\n }\n\n private _subscribeWithoutToken(): any {\n if (this._getData) {\n this._getDataAndSubscribe(this._token);\n return null;\n } else {\n return this._sendSubscribe(this._token);\n }\n }\n\n private _getDataAndSubscribe(token: string): void {\n if (!this._getData) {\n this._inflight = false;\n return;\n }\n\n this._getData({ channel: this.channel })\n .then(data => {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n this._data = data;\n this._sendSubscribe(token);\n })\n .catch(e => this._handleGetDataError(e));\n }\n\n private _handleGetDataError(error: any): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (error instanceof UnauthorizedError) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this.emit('error', {\n type: 'subscribeData',\n channel: this.channel,\n error: {\n code: errorCodes.badConfiguration,\n message: error?.toString() || ''\n }\n });\n\n this._inflight = false;\n this._scheduleResubscribe();\n }\n\n private _handleTokenResponse(token: string | null): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (!token) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this._token = token;\n\n if (this._getData) {\n this._getDataAndSubscribe(token);\n } else {\n this._sendSubscribe(token);\n }\n }\n\n private _handleTokenError(error: any): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (error instanceof UnauthorizedError) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this.emit('error', {\n type: 'subscribeToken',\n channel: this.channel,\n error: {\n code: errorCodes.subscriptionSubscribeToken,\n message: error?.toString() || ''\n }\n });\n\n this._inflight = false;\n this._scheduleResubscribe();\n }\n\n private _sendSubscribe(token: string): any {\n if (!this._isTransportOpen()) {\n this._inflight = false;\n return null;\n }\n\n const cmd = this._buildSubscribeCommand(token);\n\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._call(cmd).then(resolveCtx => {\n this._inflight = false;\n const result = resolveCtx.reply.subscribe;\n this._handleSubscribeResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n this._inflight = false;\n this._handleSubscribeError(rejectCtx.error);\n\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n\n return cmd;\n }\n\n private _buildSubscribeCommand(token: string): any {\n const req: any = { channel: this.channel };\n\n if (token) req.token = token;\n if (this._data) req.data = this._data;\n if (this._positioned) req.positioned = true;\n if (this._recoverable) req.recoverable = true;\n if (this._joinLeave) req.join_leave = true;\n\n if (this._needRecover()) {\n req.recover = true;\n const offset = this._getOffset();\n if (offset) req.offset = offset;\n const epoch = this._getEpoch();\n if (epoch) req.epoch = epoch;\n }\n\n if (this._delta) req.delta = this._delta;\n if (this._filter) req.filter = this._filter;\n\n return { subscribe: req };\n }\n\n private _debug(...args: any[]): void {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._debug(...args);\n }\n\n private _handleSubscribeError(error) {\n if (!this._isSubscribing()) {\n return;\n }\n if (error.code === errorCodes.timeout) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._disconnect(connectingCodes.subscribeTimeout, 'subscribe timeout', true);\n return;\n }\n this._subscribeError(error);\n }\n\n private _handleSubscribeResponse(result) {\n if (!this._isSubscribing()) {\n return;\n }\n this._setSubscribed(result);\n }\n\n private _setUnsubscribed(code, reason, sendUnsubscribe): Promise<void> {\n if (this._isUnsubscribed()) {\n return Promise.resolve();\n }\n let promise = Promise.resolve();\n if (this._isSubscribed()) {\n if (sendUnsubscribe) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n promise = this._centrifuge._unsubscribe(this);\n }\n this._clearSubscribedState();\n } else if (this._isSubscribing()) {\n if (this._inflight && sendUnsubscribe) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n promise = this._centrifuge._unsubscribe(this);\n }\n this._clearSubscribingState();\n }\n this._inflight = false;\n if (this._setState(SubscriptionState.Unsubscribed)) {\n this.emit('unsubscribed', { channel: this.channel, code: code, reason: reason });\n }\n this._rejectPromises({ code: errorCodes.subscriptionUnsubscribed, message: this.state });\n return promise;\n }\n\n private _handlePublication(pub: any) {\n if (this._delta && this._delta_negotiated) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const { newData, newPrevValue } = this._centrifuge._codec.applyDeltaIfNeeded(pub, this._prevValue)\n pub.data = newData;\n this._prevValue = newPrevValue;\n }\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const ctx = this._centrifuge._getPublicationContext(this.channel, pub);\n this.emit('publication', ctx);\n if (pub.offset) {\n this._offset = pub.offset;\n }\n }\n\n protected _handleJoin(join: any) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const info = this._centrifuge._getJoinLeaveContext(join.info)\n this.emit('join', { channel: this.channel, info: info });\n }\n\n protected _handleLeave(leave: any) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const info = this._centrifuge._getJoinLeaveContext(leave.info)\n this.emit('leave', { channel: this.channel, info: info });\n }\n\n private _resolvePromises() {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].resolve();\n delete this._promises[id];\n }\n }\n\n private _rejectPromises(err: any) {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].reject(err);\n delete this._promises[id];\n }\n }\n\n private _scheduleResubscribe() {\n if (!this._isSubscribing()) {\n this._debug('not in subscribing state, skip resubscribe scheduling', this.channel);\n return;\n }\n const self = this;\n const delay = this._getResubscribeDelay();\n this._resubscribeTimeout = setTimeout(function () {\n if (self._isSubscribing()) {\n self._subscribe();\n }\n }, delay);\n this._debug('resubscribe scheduled after ' + delay, this.channel);\n }\n\n private _subscribeError(err: any) {\n if (!this._isSubscribing()) {\n return;\n }\n if (err.code < 100 || err.code === 109 || err.temporary === true) {\n if (err.code === 109) { // Token expired error.\n this._token = '';\n }\n const errContext = {\n channel: this.channel,\n type: 'subscribe',\n error: err\n };\n if (this._centrifuge.state === State.Connected) {\n this.emit('error', errContext);\n }\n this._scheduleResubscribe();\n } else {\n this._setUnsubscribed(err.code, err.message, false);\n }\n }\n\n private _getResubscribeDelay() {\n const delay = backoff(this._resubscribeAttempts, this._minResubscribeDelay, this._maxResubscribeDelay);\n this._resubscribeAttempts++;\n return delay;\n }\n\n private _setOptions(options: Partial<SubscriptionOptions> | undefined) {\n if (!options) {\n return;\n }\n if (options.since) {\n this._offset = options.since.offset || 0;\n this._epoch = options.since.epoch || '';\n this._recover = true;\n }\n if (options.data) {\n this._data = options.data;\n }\n if (options.getData) {\n this._getData = options.getData;\n }\n if (options.minResubscribeDelay !== undefined) {\n this._minResubscribeDelay = options.minResubscribeDelay;\n }\n if (options.maxResubscribeDelay !== undefined) {\n this._maxResubscribeDelay = options.maxResubscribeDelay;\n }\n if (options.token) {\n this._token = options.token;\n }\n if (options.getToken) {\n this._getToken = options.getToken;\n }\n if (options.positioned === true) {\n this._positioned = true;\n }\n if (options.recoverable === true) {\n this._recoverable = true;\n }\n if (options.joinLeave === true) {\n this._joinLeave = true;\n }\n if (options.delta) {\n if (options.delta !== 'fossil') {\n throw new Error('unsupported delta format');\n }\n this._delta = options.delta;\n }\n if (options.filter) {\n this._filter = options.filter;\n }\n }\n\n private _getOffset() {\n const offset = this._offset;\n if (offset !== null) {\n return offset;\n }\n return 0;\n }\n\n private _getEpoch() {\n const epoch = this._epoch;\n if (epoch !== null) {\n return epoch;\n }\n return '';\n }\n\n private _clearRefreshTimeout() {\n if (this._refreshTimeout !== null) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n }\n\n private _clearResubscribeTimeout() {\n if (this._resubscribeTimeout !== null) {\n clearTimeout(this._resubscribeTimeout);\n this._resubscribeTimeout = null;\n }\n }\n\n private _getSubscriptionToken() {\n this._debug('get subscription token for channel', this.channel);\n const ctx = {\n channel: this.channel\n };\n const getToken = this._getToken;\n if (getToken === null) {\n this.emit('error', {\n type: 'configuration',\n channel: this.channel,\n error: {\n code: errorCodes.badConfiguration,\n message: 'provide a function to get channel subscription token'\n }\n });\n return Promise.reject(new UnauthorizedError(''));\n }\n return getToken(ctx);\n }\n\n private _refresh() {\n this._clearRefreshTimeout();\n const self = this;\n this._getSubscriptionToken().then(function (token) {\n if (!self._isSubscribed()) {\n return;\n }\n if (!token) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n const req = {\n channel: self.channel,\n token: token\n };\n const msg = {\n 'sub_refresh': req\n };\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n self._centrifuge._call(msg).then(resolveCtx => {\n const result = resolveCtx.reply.sub_refresh;\n self._refreshResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._refreshError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n }).catch(function (e) {\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n type: 'refreshToken',\n channel: self.channel,\n error: {\n code: errorCodes.subscriptionRefreshToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n self._refreshTimeout = setTimeout(() => self._refresh(), self._getRefreshRetryDelay());\n });\n }\n\n private _refreshResponse(result: any) {\n if (!this._isSubscribed()) {\n return;\n }\n this._debug('subscription token refreshed, channel', this.channel);\n this._clearRefreshTimeout();\n if (result.expires === true) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private _refreshError(err: any) {\n if (!this._isSubscribed()) {\n return;\n }\n if (err.code < 100 || err.temporary === true) {\n this.emit('error', {\n type: 'refresh',\n channel: this.channel,\n error: err\n });\n this._refreshTimeout = setTimeout(() => this._refresh(), this._getRefreshRetryDelay());\n } else {\n this._setUnsubscribed(err.code, err.message, true);\n }\n }\n\n private _getRefreshRetryDelay() {\n return backoff(0, 10000, 20000);\n }\n\n private _failUnauthorized() {\n this._setUnsubscribed(unsubscribedCodes.unauthorized, 'unauthorized', true);\n }\n}", "/** EventMap */\nexport type EventMap = {\n [key: string]: (...args: any[]) => void\n}\n\n/** Typed event emitter. */\nexport interface TypedEventEmitter<Events extends EventMap> {\n addListener<E extends keyof Events>(event: E, listener: Events[E]): this\n on<E extends keyof Events>(event: E, listener: Events[E]): this\n once<E extends keyof Events>(event: E, listener: Events[E]): this\n prependListener<E extends keyof Events>(event: E, listener: Events[E]): this\n prependOnceListener<E extends keyof Events>(event: E, listener: Events[E]): this\n off<E extends keyof Events>(event: E, listener: Events[E]): this\n removeAllListeners<E extends keyof Events>(event?: E): this\n removeListener<E extends keyof Events>(event: E, listener: Events[E]): this\n emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): boolean\n rawListeners<E extends keyof Events>(event: E): Events[E][]\n listeners<E extends keyof Events>(event: E): Events[E][]\n}\n\n/** Client events which can be emitted. */\nexport type ClientEvents = {\n /** called when client state changes */\n state: (ctx: StateContext) => void;\n /** called when client goes to connecting state */\n connecting: (ctx: ConnectingContext) => void;\n /** called when client goes to connected state */\n connected: (ctx: ConnectedContext) => void;\n /** called when client goes to disconnected state */\n disconnected: (ctx: DisconnectedContext) => void;\n\n // Async message coming from a server.\n message: (ctx: MessageContext) => void;\n // Listen to errors happening internally. \n error: (ctx: ErrorContext) => void;\n\n // Listen for server-side subscription events.\n subscribed: (ctx: ServerSubscribedContext) => void;\n subscribing: (ctx: ServerSubscribingContext) => void;\n unsubscribed: (ctx: ServerUnsubscribedContext) => void;\n publication: (ctx: ServerPublicationContext) => void;\n join: (ctx: ServerJoinContext) => void;\n leave: (ctx: ServerLeaveContext) => void;\n}\n\n/** State of client. */\nexport enum State {\n Disconnected = \"disconnected\",\n Connecting = \"connecting\",\n Connected = \"connected\"\n}\n\n/** Events of Subscription. */\nexport type SubscriptionEvents = {\n /** called when subscription state changes */\n state: (ctx: SubscriptionStateContext) => void;\n /** called when subscription state goes to subscribing */\n subscribing: (ctx: SubscribingContext) => void;\n /** called when subscription state goes to subscribed */\n subscribed: (ctx: SubscribedContext) => void;\n /** called when subscription state goes to unsubscribed */\n unsubscribed: (ctx: UnsubscribedContext) => void;\n\n /** called when publication from channel received */\n publication: (ctx: PublicationContext) => void;\n /** called when join event from channel received */\n join: (ctx: JoinContext) => void;\n /** called when leave event from channel received */\n leave: (ctx: LeaveContext) => void;\n\n /** listen to subscription errors happening internally */\n error: (ctx: SubscriptionErrorContext) => void;\n}\n\n/** State of Subscription */\nexport enum SubscriptionState {\n Unsubscribed = \"unsubscribed\",\n Subscribing = \"subscribing\",\n Subscribed = \"subscribed\"\n}\n\nexport type TransportName = 'websocket' | 'http_stream' | 'sse' | 'sockjs' | 'webtransport';\n\n/** TransportEndpoint allows configuring transport when using fallback mode */\nexport interface TransportEndpoint {\n /** transport to use */\n transport: TransportName;\n /** endpoint for a selected transport type */\n endpoint: string;\n}\n\n/** Options for Centrifuge client. */\nexport interface Options {\n // provide header emulation, these headers are sent with first protocol message\n // the backend can process those in a customized manner. In case of Centrifugo\n // these headers are then used like real HTTP headers sent from the client.\n // Requires Centrifugo v6.\n headers: {[key: string]: string};\n /** allows enabling debug mode */\n debug: boolean;\n /** allows setting initial connection token (JWT) */\n token: string;\n /** allows setting function to get/refresh connection token */\n getToken: null | ((ctx: ConnectionTokenContext) => Promise<string>);\n /** data to send to a server with connect command */\n data: any | null;\n /** allows setting function to get/renew connection data */\n getData: null | (() => Promise<any>);\n /** name of client - it's not a unique name of each connection, it's sth to identify\n * from where client connected */\n name: string;\n /** version of client */\n version: string;\n /** minimum delay between reconnect attempts in milliseconds */\n minReconnectDelay: number;\n /** maximum delay between reconnect attempts in milliseconds */\n maxReconnectDelay: number;\n /** timeout for operations in milliseconds */\n timeout: number;\n /** maximum delay of server pings to detect broken connection in milliseconds */\n maxServerPingDelay: number;\n /** provide custom WebSocket constructor, useful for NodeJS env where WebSocket is not\n * available globally */\n websocket: any | null;\n /** provide shim for fetch implementation */\n fetch: any | null;\n /** provide shim for ReadableStream */\n readableStream: any | null;\n /** provide shim for EventSource object */\n eventsource: any | null;\n /** provide shim for SockJS object */\n sockjs: any | null;\n /** allows modifying options passed to SockJS constructor */\n sockjsOptions: SockjsOptions;\n /** which emulation endpoint to use */\n emulationEndpoint: string;\n /** EventTarget for network online/offline events, in browser environment \n * Centrifuge uses global window online/offline events automatically\n * by default. */\n networkEventTarget: EventTarget | null;\n}\n\nexport interface SockjsOptions {\n transports?: string[];\n timeout?: number;\n}\n\nexport interface StateContext {\n newState: State;\n oldState: State;\n}\n\nexport interface ConnectedContext {\n client: string;\n transport: string;\n data?: any;\n}\n\nexport interface ErrorContext {\n type: string;\n error: Error;\n transport?: string;\n}\n\nexport interface Error {\n code: number;\n message: string;\n}\n\nexport interface ConnectingContext {\n code: number;\n reason: string;\n}\n\nexport interface DisconnectedContext {\n code: number;\n reason: string;\n}\n\nexport interface MessageContext {\n data: any;\n}\n\nexport interface PublicationContext {\n // channel from which publication was received.\n channel: string;\n // data contains publication payload.\n data: any;\n // info is an optional ClientInfo object. It's appended to publication only if publication was\n // sent using client SDK's publish method. If publication was sent over server publish API\n // this info object is missing as we don't have publisher client context in that case.\n info?: ClientInfo;\n // offset may be set for channels where history Centrifugo feature is on. In this case it's an\n // incremental number assigned to publication by server broker (upon adding to history stream). \n offset?: number;\n // tags is an extra key-value attached to publication, tags may be set when calling server publish API. \n tags?: Record<string, string>;\n}\n\nexport interface ClientInfo {\n // client is a globally unique identifier which server allocates for every connection.\n client: string;\n // user contains ID of authenticated user. Empty user means anonymous user. One user can have\n // many client connections.\n user: string;\n // connInfo is optional information attached to connection (during connection authentication).\n connInfo?: any;\n // chanInfo is optional information attached to subscription (during subscription authorization).\n chanInfo?: any;\n}\n\nexport interface JoinContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface LeaveContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface SubscriptionStateContext {\n channel: string;\n newState: SubscriptionState;\n oldState: SubscriptionState;\n}\n\nexport interface ServerSubscribedContext {\n /** channel of Subscription. */\n channel: string;\n /** subscription is recoverable \u2013 i.e. can automatically recover missed messages */\n recoverable: boolean;\n /** subscription is positioned \u2013 i.e. server tracks message loss on the way from PUB/SUB broker */\n positioned: boolean;\n /** streamPosition set when Subscription is recoverable or positioned. */\n streamPosition?: StreamPosition;\n /** wasRecovering is true when recovery was used in subscribe request. */\n wasRecovering: boolean;\n /** whether or not missed publications may be successfully recovered. */\n recovered: boolean;\n /** whether or not successfully recovered subscription has received missed publications.\n Warning: must be used for metrics/logs purposes only.\n Recovered publications are processed after 'subscribed' event. **/\n hasRecoveredPublications: boolean;\n /** custom data for Subscription returned from server. */\n data?: any;\n}\n\nexport interface SubscribedContext {\n /** channel of Subscription. */\n channel: string;\n /** subscription is recoverable \u2013 i.e. can automatically recover missed messages */\n recoverable: boolean;\n /** subscription is positioned \u2013 i.e. server tracks message loss on the way from PUB/SUB broker */\n positioned: boolean;\n /** streamPosition is set when Subscription is recoverable or positioned. */\n streamPosition?: StreamPosition;\n /** wasRecovering is true when recovery was used in subscribe request. */\n wasRecovering: boolean;\n /** whether or not missed publications may be successfully recovered. */\n recovered: boolean;\n /** whether or not successfully recovered subscription has received missed publications.\n Warning: must be used for metrics/logs purposes only.\n Recovered publications are processed after 'subscribed' event. **/\n hasRecoveredPublications: boolean;\n /** custom data for Subscription returned from server. */\n data?: any;\n}\n\nexport interface SubscriptionErrorContext {\n channel: string;\n type: string;\n error: Error;\n}\n\nexport interface UnsubscribedContext {\n channel: string;\n code: number;\n reason: string;\n}\n\nexport interface ServerPublicationContext {\n // channel from which publication was received.\n channel: string;\n // data contains publication payload.\n data: any;\n // info is an optional ClientInfo object. It's appended to publication only if publication was\n // sent using client SDK's publish method. If publication was sent over server publish API\n // this info object is missing as we don't have publisher client context in that case.\n info?: ClientInfo;\n // offset may be set for channels where history Centrifugo feature is on. In this case it's an\n // incremental number assigned to publication by server broker (upon adding to history stream). \n offset?: number;\n // tags is an extra key-value attached to publication, tags may be set when calling server publish API. \n tags?: Record<string, string>;\n}\n\nexport interface ServerJoinContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface ServerLeaveContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface ServerUnsubscribedContext {\n channel: string;\n}\n\nexport interface SubscribingContext {\n channel: string;\n code: number;\n reason: string;\n}\n\nexport interface ServerSubscribingContext {\n channel: string;\n}\n\nexport interface ConnectionTokenContext {\n}\n\nexport interface SubscriptionTokenContext {\n channel: string;\n}\n\nexport interface SubscriptionDataContext {\n channel: string;\n}\n\nexport interface PublishResult {\n}\n\nexport interface RpcResult {\n data: any;\n}\n\nexport interface PresenceResult {\n clients: Record<string, ClientInfo>;\n}\n\nexport interface PresenceStatsResult {\n numClients: number;\n numUsers: number;\n}\n\nexport interface HistoryResult {\n publications: PublicationContext[];\n offset: number;\n epoch: string;\n}\n\nexport interface HistoryOptions {\n limit?: number;\n since?: StreamPosition;\n reverse?: boolean;\n}\n\n/** SubscriptionOptions can customize Subscription. */\nexport interface SubscriptionOptions {\n /** allows setting initial subscription token (JWT) */\n token: string;\n /** allows setting function to get/refresh subscription token */\n getToken: null | ((ctx: SubscriptionTokenContext) => Promise<string>);\n /** data to send to a server with subscribe command */\n data: any | null;\n /** allows setting function to get/renew subscription data */\n getData: null | ((ctx: SubscriptionDataContext) => Promise<any>);\n /** force recovery on first subscribe from a provided StreamPosition. */\n since: Partial<StreamPosition> | null;\n /** min delay between resubscribe attempts. */\n minResubscribeDelay: number;\n /** max delay between resubscribe attempts. */\n maxResubscribeDelay: number;\n /** ask server to make subscription positioned. */\n positioned: boolean;\n /** ask server to make subscription recoverable. */\n recoverable: boolean;\n /** ask server to send join/leave messages. */\n joinLeave: boolean;\n /** delta format to be used */\n delta: 'fossil';\n /** filter expression for subscription */\n filter: string;\n}\n\n/** Stream postion describes position of publication inside a stream. */\nexport interface StreamPosition {\n offset: number;\n epoch: string;\n}\n", "/** @internal */\nexport function startsWith(value, prefix) {\n return value.lastIndexOf(prefix, 0) === 0;\n}\n\n/** @internal */\nexport function isFunction(value) {\n if (value === undefined || value === null) {\n return false;\n }\n return typeof value === 'function';\n}\n\n/** @internal */\nexport function log(level: string, args) {\n if (globalThis.console) {\n const logger = globalThis.console[level];\n\n if (isFunction(logger)) {\n logger.apply(globalThis.console, args);\n }\n }\n}\n\nfunction randomInt(min: number, max: number) { // min and max included\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\n/** @internal */\nexport function backoff(step: number, min: number, max: number) {\n // Full jitter technique, see:\n // https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/\n if (step > 31) { step = 31; }\n const interval = randomInt(0, Math.min(max, min * Math.pow(2, step)));\n return Math.min(max, min + interval);\n}\n\n/** @internal */\nexport function errorExists(data: any) {\n return 'error' in data && data.error !== null;\n}\n\n/** @internal */\nexport function ttlMilliseconds(ttl: number) {\n // https://stackoverflow.com/questions/12633405/what-is-the-maximum-delay-for-setinterval\n return Math.min(ttl * 1000, 2147483647);\n}\n", "/** @internal */\nexport class SockjsTransport {\n endpoint: string;\n options: any;\n _transport: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n }\n\n name() {\n return 'sockjs';\n }\n\n subName() {\n return 'sockjs-' + this._transport.transport;\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.sockjs !== null;\n }\n\n initialize(_protocol: 'json', callbacks: any) {\n this._transport = new this.options.sockjs(this.endpoint, null, this.options.sockjsOptions);\n\n this._transport.onopen = () => {\n callbacks.onOpen();\n };\n\n this._transport.onerror = e => {\n callbacks.onError(e);\n };\n\n this._transport.onclose = closeEvent => {\n callbacks.onClose(closeEvent);\n };\n\n this._transport.onmessage = event => {\n callbacks.onMessage(event.data);\n };\n }\n\n close() {\n this._transport.close();\n }\n\n send(data: any) {\n this._transport.send(data);\n }\n}\n", "/** @internal */\nexport class WebsocketTransport {\n private _transport: any;\n private endpoint: string;\n private options: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n }\n\n name() {\n return 'websocket';\n }\n\n subName() {\n return 'websocket';\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.websocket !== undefined && this.options.websocket !== null;\n }\n\n initialize(protocol: string, callbacks: any) {\n let subProtocol = '';\n if (protocol === 'protobuf') {\n subProtocol = 'centrifuge-protobuf';\n }\n if (subProtocol !== '') {\n this._transport = new this.options.websocket(this.endpoint, subProtocol);\n } else {\n this._transport = new this.options.websocket(this.endpoint);\n }\n if (protocol === 'protobuf') {\n this._transport.binaryType = 'arraybuffer';\n }\n\n this._transport.onopen = () => {\n callbacks.onOpen();\n };\n\n this._transport.onerror = e => {\n callbacks.onError(e);\n };\n\n this._transport.onclose = closeEvent => {\n callbacks.onClose(closeEvent);\n };\n\n this._transport.onmessage = event => {\n callbacks.onMessage(event.data);\n };\n }\n\n close() {\n this._transport.close();\n }\n\n send(data: any) {\n this._transport.send(data);\n }\n}\n", "/** @internal */\nexport class HttpStreamTransport {\n endpoint: string;\n options: any;\n _abortController: any | null;\n _utf8decoder: TextDecoder;\n _protocol: string;\n\n constructor(endpoint, options) {\n this.endpoint = endpoint;\n this.options = options;\n this._abortController = null;\n this._utf8decoder = new TextDecoder();\n this._protocol = 'json';\n }\n\n name() {\n return 'http_stream';\n }\n\n subName() {\n return 'http_stream';\n }\n\n emulation() {\n return true;\n }\n\n _handleErrors(response: any) {\n if (!response.ok) throw new Error(response.status);\n return response;\n }\n\n _fetchEventTarget(self, endpoint: string, options: object) {\n const eventTarget = new EventTarget();\n // fetch with connection timeout maybe? https://github.com/github/fetch/issues/175\n const fetchFunc = self.options.fetch;\n fetchFunc(endpoint, options)\n .then(self._handleErrors)\n .then(response => {\n eventTarget.dispatchEvent(new Event('open'));\n let jsonStreamBuf = '';\n let jsonStreamPos = 0;\n let protoStreamBuf = new Uint8Array();\n const reader = response.body.getReader();\n return new self.options.readableStream({\n start(controller) {\n function pump() {\n return reader.read().then(({ done, value }) => {\n // When no more data needs to be consumed, close the stream\n if (done) {\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n }\n try {\n if (self._protocol === 'json') {\n jsonStreamBuf += self._utf8decoder.decode(value);\n while (jsonStreamPos < jsonStreamBuf.length) {\n if (jsonStreamBuf[jsonStreamPos] === '\\n') {\n const line = jsonStreamBuf.substring(0, jsonStreamPos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: line }));\n jsonStreamBuf = jsonStreamBuf.substring(jsonStreamPos + 1);\n jsonStreamPos = 0;\n } else {\n ++jsonStreamPos;\n }\n }\n } else {\n const mergedArray = new Uint8Array(protoStreamBuf.length + value.length);\n mergedArray.set(protoStreamBuf);\n mergedArray.set(value, protoStreamBuf.length);\n protoStreamBuf = mergedArray;\n\n while (true) {\n const result = self.options.decoder.decodeReply(protoStreamBuf);\n if (result.ok) {\n const data = protoStreamBuf.slice(0, result.pos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: data }));\n protoStreamBuf = protoStreamBuf.slice(result.pos);\n continue;\n }\n break;\n }\n }\n } catch (error) {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: error }));\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n }\n pump();\n }).catch(function (e) {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: e }));\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n });\n }\n return pump();\n }\n });\n })\n .catch(error => {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: error }));\n eventTarget.dispatchEvent(new Event('close'));\n });\n return eventTarget;\n }\n\n supported() {\n return this.options.fetch !== null &&\n this.options.readableStream !== null &&\n typeof TextDecoder !== 'undefined' &&\n typeof AbortController !== 'undefined' &&\n typeof EventTarget !== 'undefined' &&\n typeof Event !== 'undefined' &&\n typeof MessageEvent !== 'undefined' &&\n typeof Error !== 'undefined';\n }\n\n initialize(protocol: string, callbacks: any, initialData: any) {\n this._protocol = protocol;\n this._abortController = new AbortController();\n let headers: any;\n let body: any;\n if (protocol === 'json') {\n headers = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n body = initialData;\n } else {\n headers = {\n 'Accept': 'application/octet-stream',\n 'Content-Type': 'application/octet-stream'\n };\n body = initialData;\n }\n\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n signal: this._abortController.signal\n }\n\n const eventTarget = this._fetchEventTarget(\n this,\n this.endpoint,\n fetchOptions\n );\n\n eventTarget.addEventListener('open', () => {\n callbacks.onOpen();\n });\n\n eventTarget.addEventListener('error', (e) => {\n this._abortController.abort();\n callbacks.onError(e);\n });\n\n eventTarget.addEventListener('close', () => {\n this._abortController.abort();\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n\n eventTarget.addEventListener('message', (e: any) => {\n callbacks.onMessage(e.data);\n });\n }\n\n close() {\n this._abortController.abort();\n }\n\n send(data: any, session: string, node: string) {\n let headers: any;\n let body: any;\n const req = {\n session: session,\n node: node,\n data: data\n };\n if (this._protocol === 'json') {\n headers = {\n 'Content-Type': 'application/json'\n };\n body = JSON.stringify(req);\n } else {\n headers = {\n 'Content-Type': 'application/octet-stream'\n };\n body = this.options.encoder.encodeEmulationRequest(req);\n }\n\n const fetchFunc = this.options.fetch;\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n }\n fetchFunc(this.options.emulationEndpoint, fetchOptions);\n }\n}\n", "/** @internal */\nexport class SseTransport {\n endpoint: string;\n options: any;\n _protocol: string;\n _transport: any;\n _onClose: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._protocol = 'json';\n this._transport = null;\n this._onClose = null;\n }\n\n name() {\n return 'sse';\n }\n\n subName() {\n return 'sse';\n }\n\n emulation() {\n return true;\n }\n\n supported() {\n return this.options.eventsource !== null && this.options.fetch !== null;\n }\n\n initialize(_protocol: 'json', callbacks: any, initialData: any) {\n let url: any;\n if (globalThis && globalThis.document && globalThis.document.baseURI) {\n // Handle case when endpoint is relative, like //example.com/connection/sse\n url = new URL(this.endpoint, globalThis.document.baseURI);\n } else {\n url = new URL(this.endpoint);\n }\n url.searchParams.append('cf_connect', initialData);\n\n const eventsourceOptions = {}\n const eventSource = new this.options.eventsource(url.toString(), eventsourceOptions);\n this._transport = eventSource;\n\n const self = this;\n\n eventSource.onopen = function () {\n callbacks.onOpen();\n };\n\n eventSource.onerror = function (e) {\n eventSource.close();\n callbacks.onError(e);\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n };\n\n eventSource.onmessage = function (e) {\n callbacks.onMessage(e.data);\n };\n\n self._onClose = function () {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n };\n }\n\n close() {\n this._transport.close();\n if (this._onClose !== null) {\n this._onClose();\n }\n }\n\n send(data: any, session: string, node: string) {\n const req = {\n session: session,\n node: node,\n data: data\n };\n const headers = {\n 'Content-Type': 'application/json'\n };\n const body = JSON.stringify(req);\n const fetchFunc = this.options.fetch;\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n }\n fetchFunc(this.options.emulationEndpoint, fetchOptions);\n }\n}\n", "/** @internal */\nexport class WebtransportTransport {\n private _transport: any;\n private _stream: any;\n private _writer: any;\n private endpoint: string;\n private options: any;\n _utf8decoder: TextDecoder;\n _protocol: string;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n this._stream = null;\n this._writer = null;\n this._utf8decoder = new TextDecoder();\n this._protocol = 'json';\n }\n\n name() {\n return 'webtransport';\n }\n\n subName() {\n return 'webtransport';\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.webtransport !== undefined && this.options.webtransport !== null;\n }\n\n async initialize(protocol: string, callbacks: any) {\n let url: any;\n if (globalThis && globalThis.document && globalThis.document.baseURI) {\n // Handle case when endpoint is relative, like //example.com/connection/webtransport\n url = new URL(this.endpoint, globalThis.document.baseURI);\n } else {\n url = new URL(this.endpoint);\n }\n if (protocol === 'protobuf') {\n url.searchParams.append('cf_protocol', 'protobuf');\n }\n\n this._protocol = protocol;\n const eventTarget = new EventTarget();\n\n this._transport = new this.options.webtransport(url.toString());\n this._transport.closed.then(() => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n }).catch(() => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n try {\n await this._transport.ready;\n } catch {\n this.close();\n return;\n }\n let stream: any;\n try {\n stream = await this._transport.createBidirectionalStream();\n } catch {\n this.close();\n return;\n }\n this._stream = stream;\n this._writer = this._stream.writable.getWriter();\n\n eventTarget.addEventListener('close', () => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n\n eventTarget.addEventListener('message', (e: any) => {\n callbacks.onMessage(e.data);\n });\n\n this._startReading(eventTarget);\n\n callbacks.onOpen();\n }\n\n async _startReading(eventTarget: any) {\n const reader = this._stream.readable.getReader();\n let jsonStreamBuf = '';\n let jsonStreamPos = 0;\n let protoStreamBuf = new Uint8Array();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (value.length > 0) {\n if (this._protocol === 'json') {\n jsonStreamBuf += this._utf8decoder.decode(value);\n while (jsonStreamPos < jsonStreamBuf.length) {\n if (jsonStreamBuf[jsonStreamPos] === '\\n') {\n const line = jsonStreamBuf.substring(0, jsonStreamPos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: line }));\n jsonStreamBuf = jsonStreamBuf.substring(jsonStreamPos + 1);\n jsonStreamPos = 0;\n } else {\n ++jsonStreamPos;\n }\n }\n } else {\n const mergedArray = new Uint8Array(protoStreamBuf.length + value.length);\n mergedArray.set(protoStreamBuf);\n mergedArray.set(value, protoStreamBuf.length);\n protoStreamBuf = mergedArray;\n\n while (true) {\n const result = this.options.decoder.decodeReply(protoStreamBuf);\n if (result.ok) {\n const data = protoStreamBuf.slice(0, result.pos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: data }));\n protoStreamBuf = protoStreamBuf.slice(result.pos);\n continue;\n }\n break;\n }\n }\n }\n if (done) {\n break;\n }\n }\n } catch {\n eventTarget.dispatchEvent(new Event('close'));\n }\n }\n\n async close() {\n try {\n if (this._writer) {\n await this._writer.close();\n }\n this._transport.close();\n } catch (e) {\n // already closed.\n }\n }\n\n async send(data: any) {\n let binary: Uint8Array;\n if (this._protocol === 'json') {\n // Need extra \\n since WT is non-frame protocol. \n binary = new TextEncoder().encode(data + '\\n');\n } else {\n binary = data;\n }\n try {\n await this._writer.write(binary);\n } catch (e) {\n this.close();\n }\n }\n}\n", "/*\nCopyright 2014-2024 Dmitry Chestnykh (JavaScript port)\nCopyright 2007 D. Richard Hipp (original C version)\n\nFossil SCM delta compression algorithm, this is only the applyDelta part extracted\nfrom https://github.com/dchest/fossil-delta-js. The code was slightly modified\nto strip unnecessary parts. The copyright on top of this file is from the original\nrepo on Github licensed under Simplified BSD License.\n*/\n\n// We accept plain arrays of bytes or Uint8Array.\ntype ByteArray = number[] | Uint8Array;\n\n\nconst zValue = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1,\n -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,\n 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, 36, -1, 37,\n 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,\n 57, 58, 59, 60, 61, 62, -1, -1, -1, 63, -1,\n];\n\n// Reader reads bytes, chars, ints from array.\nclass Reader {\n public a: ByteArray;\n public pos: number;\n\n constructor(array: ByteArray) {\n this.a = array; // source array\n this.pos = 0; // current position in array\n }\n\n haveBytes() {\n return this.pos < this.a.length;\n }\n\n getByte() {\n const b = this.a[this.pos];\n this.pos++;\n if (this.pos > this.a.length) throw new RangeError(\"out of bounds\");\n return b;\n }\n\n getChar() {\n return String.fromCharCode(this.getByte());\n }\n\n // Read base64-encoded unsigned integer.\n getInt() {\n let v = 0;\n let c: number;\n while (this.haveBytes() && (c = zValue[0x7f & this.getByte()]) >= 0) {\n v = (v << 6) + c;\n }\n this.pos--;\n return v >>> 0;\n }\n}\n\n// Write writes an array.\nclass Writer {\n private a: number[] = [];\n\n toByteArray<T extends ByteArray>(sourceType: T): T {\n if (Array.isArray(sourceType)) {\n return this.a as T;\n }\n return new Uint8Array(this.a) as T;\n }\n\n // Copy from array at start to end.\n putArray(a: ByteArray, start: number, end: number) {\n // TODO: optimize.\n for (let i = start; i < end; i++) this.a.push(a[i]);\n }\n}\n\n// Return a 32-bit checksum of the array.\nfunction checksum(arr: ByteArray): number {\n let sum0 = 0,\n sum1 = 0,\n sum2 = 0,\n sum3 = 0,\n z = 0,\n N = arr.length;\n //TODO measure if this unrolling is helpful.\n while (N >= 16) {\n sum0 = (sum0 + arr[z + 0]) | 0;\n sum1 = (sum1 + arr[z + 1]) | 0;\n sum2 = (sum2 + arr[z + 2]) | 0;\n sum3 = (sum3 + arr[z + 3]) | 0;\n\n sum0 = (sum0 + arr[z + 4]) | 0;\n sum1 = (sum1 + arr[z + 5]) | 0;\n sum2 = (sum2 + arr[z + 6]) | 0;\n sum3 = (sum3 + arr[z + 7]) | 0;\n\n sum0 = (sum0 + arr[z + 8]) | 0;\n sum1 = (sum1 + arr[z + 9]) | 0;\n sum2 = (sum2 + arr[z + 10]) | 0;\n sum3 = (sum3 + arr[z + 11]) | 0;\n\n sum0 = (sum0 + arr[z + 12]) | 0;\n sum1 = (sum1 + arr[z + 13]) | 0;\n sum2 = (sum2 + arr[z + 14]) | 0;\n sum3 = (sum3 + arr[z + 15]) | 0;\n\n z += 16;\n N -= 16;\n }\n while (N >= 4) {\n sum0 = (sum0 + arr[z + 0]) | 0;\n sum1 = (sum1 + arr[z + 1]) | 0;\n sum2 = (sum2 + arr[z + 2]) | 0;\n sum3 = (sum3 + arr[z + 3]) | 0;\n z += 4;\n N -= 4;\n }\n sum3 = (((((sum3 + (sum2 << 8)) | 0) + (sum1 << 16)) | 0) + (sum0 << 24)) | 0;\n switch (N) {\n //@ts-ignore fallthrough is needed.\n case 3:\n sum3 = (sum3 + (arr[z + 2] << 8)) | 0; /* falls through */\n //@ts-ignore fallthrough is needed.\n case 2:\n sum3 = (sum3 + (arr[z + 1] << 16)) | 0; /* falls through */\n case 1:\n sum3 = (sum3 + (arr[z + 0] << 24)) | 0; /* falls through */\n }\n return sum3 >>> 0;\n}\n\n/**\n * Apply a delta byte array to a source byte array, returning the target byte array.\n */\nexport function applyDelta<T extends ByteArray>(\n source: T,\n delta: T\n): T {\n let total = 0;\n const zDelta = new Reader(delta);\n const lenSrc = source.length;\n const lenDelta = delta.length;\n\n const limit = zDelta.getInt();\n if (zDelta.getChar() !== \"\\n\")\n throw new Error(\"size integer not terminated by '\\\\n'\");\n const zOut = new Writer();\n while (zDelta.haveBytes()) {\n const cnt = zDelta.getInt();\n let ofst: number;\n\n switch (zDelta.getChar()) {\n case \"@\":\n ofst = zDelta.getInt();\n if (zDelta.haveBytes() && zDelta.getChar() !== \",\")\n throw new Error(\"copy command not terminated by ','\");\n total += cnt;\n if (total > limit) throw new Error(\"copy exceeds output file size\");\n if (ofst + cnt > lenSrc)\n throw new Error(\"copy extends past end of input\");\n zOut.putArray(source, ofst, ofst + cnt);\n break;\n\n case \":\":\n total += cnt;\n if (total > limit)\n throw new Error(\n \"insert command gives an output larger than predicted\"\n );\n if (cnt > lenDelta)\n throw new Error(\"insert count exceeds size of delta\");\n zOut.putArray(zDelta.a, zDelta.pos, zDelta.pos + cnt);\n zDelta.pos += cnt;\n break;\n\n case \";\":\n {\n const out = zOut.toByteArray(source);\n if (cnt !== checksum(out))\n throw new Error(\"bad checksum\");\n if (total !== limit)\n throw new Error(\"generated size does not match predicted size\");\n return out;\n }\n default:\n throw new Error(\"unknown delta operator\");\n }\n }\n throw new Error(\"unterminated delta\");\n}\n", "import { applyDelta } from './fossil';\n\n/** @internal */\nexport class JsonCodec {\n name() {\n return 'json';\n }\n\n encodeCommands(commands: any[]): string {\n return commands.map(c => JSON.stringify(c)).join('\\n');\n }\n\n decodeReplies(data: string): any[] {\n return data.trim().split('\\n').map(r => JSON.parse(r));\n }\n\n applyDeltaIfNeeded(pub: any, prevValue: any) {\n let newData: any, newPrevValue: any;\n if (pub.delta) {\n // JSON string delta.\n const valueArray = applyDelta(prevValue, new TextEncoder().encode(pub.data));\n newData = JSON.parse(new TextDecoder().decode(valueArray))\n newPrevValue = valueArray;\n } else {\n // Full data as JSON string.\n newData = JSON.parse(pub.data);\n newPrevValue = new TextEncoder().encode(pub.data);\n }\n return { newData, newPrevValue }\n }\n}\n", "import { Subscription } from './subscription';\nimport {\n errorCodes, disconnectedCodes,\n connectingCodes, subscribingCodes\n} from './codes';\n\nimport { SockjsTransport } from './transport_sockjs';\nimport { WebsocketTransport } from './transport_websocket';\nimport { HttpStreamTransport } from './transport_http_stream';\nimport { SseTransport } from './transport_sse';\nimport { WebtransportTransport } from './transport_webtransport';\n\nimport { JsonCodec } from './json';\n\nimport {\n isFunction, log, startsWith, errorExists,\n backoff, ttlMilliseconds\n} from './utils';\n\nimport {\n State, Options, SubscriptionState, ClientEvents,\n TypedEventEmitter, RpcResult, SubscriptionOptions,\n HistoryOptions, HistoryResult, PublishResult,\n PresenceResult, PresenceStatsResult, SubscribedContext,\n TransportEndpoint,\n} from './types';\n\nimport EventEmitter from 'events';\n\nconst defaults: Options = {\n headers: {},\n token: '',\n getToken: null,\n data: null,\n getData: null,\n debug: false,\n name: 'js',\n version: '',\n fetch: null,\n readableStream: null,\n websocket: null,\n eventsource: null,\n sockjs: null,\n sockjsOptions: {},\n emulationEndpoint: '/emulation',\n minReconnectDelay: 500,\n maxReconnectDelay: 20000,\n timeout: 5000,\n maxServerPingDelay: 10000,\n networkEventTarget: null,\n}\n\ninterface serverSubscription {\n offset: number;\n epoch: string;\n recoverable: boolean;\n}\n\ntype CallResolveContext = { reply: any; next?: () => void };\ntype CallRejectContext = { error: any; next?: () => void };\n\nexport class UnauthorizedError extends Error {\n constructor(message: any) {\n super(message);\n this.name = this.constructor.name;\n }\n}\n\n/** Centrifuge is a Centrifuge/Centrifugo bidirectional client. */\nexport class Centrifuge extends (EventEmitter as new () => TypedEventEmitter<ClientEvents>) {\n state: State;\n private _transportIsOpen: boolean;\n private _endpoint: string | Array<TransportEndpoint>;\n private _emulation: boolean;\n private _transports: any[];\n private _currentTransportIndex: number;\n private _triedAllTransports: boolean;\n private _transportWasOpen: boolean;\n private _transport?: any;\n private _transportId: number;\n private _deviceWentOffline: boolean;\n private _transportClosed: boolean;\n private _reconnecting: boolean;\n private _reconnectTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _reconnectAttempts: number;\n private _client: null;\n private _session: string;\n private _node: string;\n private _subs: Record<string, Subscription>;\n private _serverSubs: Record<string, serverSubscription>;\n private _commandId: number;\n private _commands: any[];\n private _batching: boolean;\n private _refreshRequired: boolean;\n private _refreshTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _callbacks: Record<number, any>;\n private _token: string;\n private _data: any;\n private _dispatchPromise: Promise<void>;\n private _serverPing: number;\n private _serverPingTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _sendPong: boolean;\n private _promises: Record<number, any>;\n private _promiseId: number;\n private _networkEventsSet: boolean;\n\n private _debugEnabled: boolean;\n private _config: Options;\n protected _codec: any;\n\n static SubscriptionState: typeof SubscriptionState;\n static State: typeof State;\n static UnauthorizedError: typeof UnauthorizedError;\n\n /** Constructs Centrifuge client. Call connect() method to start connecting. */\n constructor(endpoint: string | Array<TransportEndpoint>, options?: Partial<Options>) {\n super();\n this.state = State.Disconnected;\n this._transportIsOpen = false;\n this._endpoint = endpoint;\n this._emulation = false;\n this._transports = [];\n this._currentTransportIndex = 0;\n this._triedAllTransports = false;\n this._transportWasOpen = false;\n this._transport = null;\n this._transportId = 0;\n this._deviceWentOffline = false;\n this._transportClosed = true;\n this._codec = new JsonCodec();\n this._reconnecting = false;\n this._reconnectTimeout = null;\n this._reconnectAttempts = 0;\n this._client = null;\n this._session = '';\n this._node = '';\n this._subs = {};\n this._serverSubs = {};\n this._commandId = 0;\n this._commands = [];\n this._batching = false;\n this._refreshRequired = false;\n this._refreshTimeout = null;\n this._callbacks = {};\n this._token = '';\n this._data = null;\n this._dispatchPromise = Promise.resolve();\n this._serverPing = 0;\n this._serverPingTimeout = null;\n this._sendPong = false;\n this._promises = {};\n this._promiseId = 0;\n this._debugEnabled = false;\n this._networkEventsSet = false;\n\n this._config = { ...defaults, ...options };\n this._configure();\n\n if (this._debugEnabled) {\n this.on('state', (ctx) => {\n this._debug('client state', ctx.oldState, '->', ctx.newState);\n });\n this.on('error', (ctx) => {\n this._debug('client error', ctx);\n });\n } else {\n // Avoid unhandled exception in EventEmitter for non-set error handler.\n this.on('error', function () { Function.prototype(); });\n }\n }\n\n /** newSubscription allocates new Subscription to a channel. Since server only allows \n * one subscription per channel per client this method throws if client already has \n * channel subscription in internal registry.\n * */\n newSubscription(channel: string, options?: Partial<SubscriptionOptions>): Subscription {\n if (this.getSubscription(channel) !== null) {\n throw new Error('Subscription to the channel ' + channel + ' already exists');\n }\n const sub = new Subscription(this, channel, options);\n this._subs[channel] = sub;\n return sub;\n }\n\n /** getSubscription returns Subscription if it's registered in the internal \n * registry or null. */\n getSubscription(channel: string): Subscription | null {\n return this._getSub(channel);\n }\n\n /** removeSubscription allows removing Subcription from the internal registry. */\n removeSubscription(sub: Subscription | null) {\n if (!sub) {\n return;\n }\n if (sub.state !== SubscriptionState.Unsubscribed) {\n sub.unsubscribe();\n }\n this._removeSubscription(sub);\n }\n\n /** Get a map with all current client-side subscriptions. */\n subscriptions(): Record<string, Subscription> {\n return this._subs;\n }\n\n /** ready returns a Promise which resolves upon client goes to Connected \n * state and rejects in case of client goes to Disconnected or Failed state.\n * Users can provide optional timeout in milliseconds. */\n ready(timeout?: number): Promise<void> {\n switch (this.state) {\n case State.Disconnected:\n return Promise.reject({ code: errorCodes.clientDisconnected, message: 'client disconnected' });\n\n case State.Connected:\n return Promise.resolve();\n\n default:\n return new Promise((resolve, reject) => {\n const ctx: any = { resolve, reject };\n\n if (timeout) {\n ctx.timeout = setTimeout(() => {\n reject({ code: errorCodes.timeout, message: 'timeout' });\n }, timeout);\n }\n\n this._promises[this._nextPromiseId()] = ctx;\n });\n }\n }\n\n /** connect to a server. */\n connect() {\n if (this._isConnected()) {\n this._debug('connect called when already connected');\n return;\n }\n if (this._isConnecting()) {\n this._debug('connect called when already connecting');\n return;\n }\n this._debug('connect called');\n this._reconnectAttempts = 0;\n this._startConnecting();\n }\n\n /** disconnect from a server. */\n disconnect() {\n this._disconnect(disconnectedCodes.disconnectCalled, 'disconnect called', false);\n }\n\n /** setToken allows setting connection token. Or resetting used token to be empty. */\n setToken(token: string) {\n this._token = token;\n }\n\n /** setHeaders allows setting connection emulated headers. */\n setHeaders(headers: { [key: string]: string }) {\n this._config.headers = headers;\n }\n\n /** send asynchronous data to a server (without any response from a server \n * expected, see rpc method if you need response). */\n async send(data: any): Promise<void> {\n const cmd = {\n send: {\n data\n }\n };\n\n await this._methodCall();\n\n const sent = this._transportSendCommands([cmd]); // can send message to server without id set\n\n if (!sent) {\n throw this._createErrorObject(\n errorCodes.transportWriteError,\n 'transport write error'\n );\n }\n }\n\n /** rpc to a server - i.e. a call which waits for a response with data. */\n async rpc(method: string, data: any): Promise<RpcResult> {\n const cmd = {\n rpc: {\n method,\n data\n }\n };\n\n await this._methodCall();\n const result = await this._callPromise(cmd, (reply: any) => reply.rpc);\n return {\n data: result.data\n };\n }\n\n /** publish data to a channel. */\n async publish(channel: string, data: any): Promise<PublishResult> {\n const cmd = {\n publish: {\n channel,\n data\n }\n };\n\n await this._methodCall();\n await this._callPromise(cmd, () => ({}));\n return {};\n }\n\n /** history for a channel. By default it does not return publications (only current\n * StreamPosition data) \u2013 provide an explicit limit > 0 to load publications.*/\n async history(channel: string, options?: HistoryOptions): Promise<HistoryResult> {\n const cmd = {\n history: this._getHistoryRequest(channel, options)\n };\n\n await this._methodCall();\n\n const result = await this._callPromise(cmd, (reply: any) => reply.history);\n\n const publications: any[] = [];\n\n if (result.publications) {\n for (let i = 0; i < result.publications.length; i++) {\n publications.push(this._getPublicationContext(channel, result.publications[i]));\n }\n }\n\n return {\n publications,\n epoch: result.epoch || '',\n offset: result.offset || 0\n };\n }\n\n /** presence for a channel. */\n async presence(channel: string): Promise<PresenceResult> {\n const cmd = {\n presence: {\n channel\n }\n };\n\n await this._methodCall();\n const result = await this._callPromise(cmd, (reply: any) => reply.presence);\n\n const clients = result.presence;\n\n for (const clientId in clients) {\n if (Object.prototype.hasOwnProperty.call(clients, clientId)) {\n const rawClient = clients[clientId];\n const connInfo = rawClient['conn_info'];\n const chanInfo = rawClient['chan_info'];\n if (connInfo) {\n rawClient.connInfo = connInfo;\n }\n if (chanInfo) {\n rawClient.chanInfo = chanInfo;\n }\n }\n }\n\n return { clients };\n }\n\n async presenceStats(channel: string): Promise<PresenceStatsResult> {\n const cmd: any = {\n 'presence_stats': {\n channel\n }\n };\n\n await this._methodCall();\n\n const result = await this._callPromise(cmd, (reply: any) => {\n return reply.presence_stats;\n });\n\n return {\n numUsers: result.num_users,\n numClients: result.num_clients\n };\n }\n\n /** start command batching (collect into temporary buffer without sending to a server) \n * until stopBatching called.*/\n startBatching() {\n // start collecting messages without sending them to Centrifuge until flush\n // method called\n this._batching = true;\n }\n\n /** stop batching commands and flush collected commands to the \n * network (all in one request/frame).*/\n stopBatching() {\n const self = this;\n // Why so nested? Two levels here requred to deal with promise resolving queue.\n // In Subscription case we wait 2 futures before sending data to connection.\n // Otherwise _batching becomes false before batching decision has a chance to be executed.\n Promise.resolve().then(function () {\n Promise.resolve().then(function () {\n self._batching = false;\n self._flush();\n })\n })\n }\n\n private _debug(...args: any[]) {\n if (!this._debugEnabled) {\n return;\n }\n log('debug', args);\n }\n\n private _codecName(): string {\n return this._codec.name()\n }\n\n /** @internal */\n protected _formatOverride() {\n return;\n }\n\n private _configure() {\n if (!('Promise' in globalThis)) {\n throw new Error('Promise polyfill required');\n }\n\n if (!this._endpoint) {\n throw new Error('endpoint configuration required');\n }\n\n if (this._config.token !== null) {\n this._token = this._config.token;\n }\n\n if (this._config.data !== null) {\n this._data = this._config.data;\n }\n\n this._codec = new JsonCodec();\n this._formatOverride();\n\n if (this._config.debug === true ||\n (typeof localStorage !== 'undefined' && localStorage.getItem('centrifuge.debug'))) {\n this._debugEnabled = true;\n }\n\n this._debug('config', this._config);\n\n if (typeof this._endpoint === 'string') {\n // Single address.\n } else if (typeof this._endpoint === 'object' && this._endpoint instanceof Array) {\n this._transports = this._endpoint;\n this._emulation = true;\n for (const i in this._transports) {\n if (this._transports.hasOwnProperty(i)) {\n const transportConfig = this._transports[i];\n if (!transportConfig.endpoint || !transportConfig.transport) {\n throw new Error('malformed transport configuration');\n }\n const transportName = transportConfig.transport;\n if (['websocket', 'http_stream', 'sse', 'sockjs', 'webtransport'].indexOf(transportName) < 0) {\n throw new Error('unsupported transport name: ' + transportName);\n }\n }\n }\n } else {\n throw new Error('unsupported url configuration type: only string or array of objects are supported');\n }\n }\n\n private _setState(newState: State) {\n if (this.state !== newState) {\n this._reconnecting = false;\n const oldState = this.state;\n this.state = newState;\n this.emit('state', { newState, oldState });\n return true;\n }\n return false;\n }\n\n private _isDisconnected() {\n return this.state === State.Disconnected;\n }\n\n private _isConnecting() {\n return this.state === State.Connecting;\n }\n\n private _isConnected() {\n return this.state === State.Connected;\n }\n\n private _nextCommandId() {\n return ++this._commandId;\n }\n\n private _setNetworkEvents() {\n if (this._networkEventsSet) {\n return;\n }\n let eventTarget: EventTarget | null = null;\n if (this._config.networkEventTarget !== null) {\n eventTarget = this._config.networkEventTarget;\n } else if (typeof globalThis.addEventListener !== 'undefined') {\n eventTarget = globalThis as EventTarget;\n }\n if (eventTarget) {\n eventTarget.addEventListener('offline', () => {\n this._debug('offline event triggered');\n if (this.state === State.Connected || this.state === State.Connecting) {\n this._disconnect(connectingCodes.transportClosed, 'transport closed', true);\n this._deviceWentOffline = true;\n }\n });\n eventTarget.addEventListener('online', () => {\n this._debug('online event triggered');\n if (this.state !== State.Connecting) {\n return;\n }\n if (this._deviceWentOffline && !this._transportClosed) {\n // This is a workaround for mobile Safari where close callback may be\n // not issued upon device going to the flight mode. We know for sure\n // that transport close was called, so we start reconnecting. In this\n // case if the close callback will be issued for some reason after some\n // time \u2013 it will be ignored due to transport ID mismatch.\n this._deviceWentOffline = false;\n this._transportClosed = true;\n }\n this._clearReconnectTimeout();\n this._startReconnecting();\n });\n this._networkEventsSet = true;\n }\n }\n\n private _getReconnectDelay() {\n const delay = backoff(this._reconnectAttempts, this._config.minReconnectDelay, this._config.maxReconnectDelay);\n this._reconnectAttempts += 1;\n return delay;\n }\n\n private _clearOutgoingRequests() {\n // fire errbacks of registered outgoing calls.\n for (const id in this._callbacks) {\n if (this._callbacks.hasOwnProperty(id)) {\n const callbacks = this._callbacks[id];\n clearTimeout(callbacks.timeout);\n const errback = callbacks.errback;\n if (!errback) {\n continue;\n }\n errback({ error: this._createErrorObject(errorCodes.connectionClosed, 'connection closed') });\n }\n }\n this._callbacks = {};\n }\n\n private _clearConnectedState() {\n this._client = null;\n this._clearServerPingTimeout();\n this._clearRefreshTimeout();\n\n // fire events for client-side subscriptions.\n for (const channel in this._subs) {\n if (!this._subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = this._subs[channel];\n if (sub.state === SubscriptionState.Subscribed) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setSubscribing(subscribingCodes.transportClosed, 'transport closed');\n }\n }\n\n // fire events for server-side subscriptions.\n for (const channel in this._serverSubs) {\n if (this._serverSubs.hasOwnProperty(channel)) {\n this.emit('subscribing', { channel: channel });\n }\n }\n }\n\n private _handleWriteError(commands: any[]) {\n for (const command of commands) {\n const id = command.id;\n if (!(id in this._callbacks)) {\n continue;\n }\n const callbacks = this._callbacks[id];\n clearTimeout(this._callbacks[id].timeout);\n delete this._callbacks[id];\n const errback = callbacks.errback;\n errback({ error: this._createErrorObject(errorCodes.transportWriteError, 'transport write error') });\n }\n }\n\n private _transportSendCommands(commands: any[]) {\n if (!commands.length) {\n return true;\n }\n if (!this._transport) {\n return false\n }\n try {\n this._transport.send(this._codec.encodeCommands(commands), this._session, this._node);\n } catch (e) {\n this._debug('error writing commands', e);\n this._handleWriteError(commands);\n return false;\n }\n return true;\n }\n\n private _initializeTransport() {\n let websocket: any;\n if (this._config.websocket !== null) {\n websocket = this._config.websocket;\n } else {\n if (!(typeof globalThis.WebSocket !== 'function' && typeof globalThis.WebSocket !== 'object')) {\n websocket = globalThis.WebSocket;\n }\n }\n\n let sockjs = null;\n if (this._config.sockjs !== null) {\n sockjs = this._config.sockjs;\n } else {\n if (typeof globalThis.SockJS !== 'undefined') {\n sockjs = globalThis.SockJS;\n }\n }\n\n let eventsource: any = null;\n if (this._config.eventsource !== null) {\n eventsource = this._config.eventsource;\n } else {\n if (typeof globalThis.EventSource !== 'undefined') {\n eventsource = globalThis.EventSource;\n }\n }\n\n let fetchFunc: any = null;\n if (this._config.fetch !== null) {\n fetchFunc = this._config.fetch;\n } else {\n if (typeof globalThis.fetch !== 'undefined') {\n fetchFunc = globalThis.fetch;\n }\n }\n\n let readableStream: any = null;\n if (this._config.readableStream !== null) {\n readableStream = this._config.readableStream;\n } else {\n if (typeof globalThis.ReadableStream !== 'undefined') {\n readableStream = globalThis.ReadableStream;\n }\n }\n\n if (!this._emulation) {\n if (startsWith(this._endpoint, 'http')) {\n throw new Error('Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport');\n } else {\n this._debug('client will use websocket');\n this._transport = new WebsocketTransport(this._endpoint as string, {\n websocket: websocket\n });\n if (!this._transport.supported()) {\n throw new Error('WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options');\n }\n }\n } else {\n if (this._currentTransportIndex >= this._transports.length) {\n this._triedAllTransports = true;\n this._currentTransportIndex = 0;\n }\n let count = 0;\n while (true) {\n if (count >= this._transports.length) {\n throw new Error('no supported transport found');\n }\n const transportConfig = this._transports[this._currentTransportIndex];\n const transportName = transportConfig.transport;\n const transportEndpoint = transportConfig.endpoint;\n\n if (transportName === 'websocket') {\n this._debug('trying websocket transport');\n this._transport = new WebsocketTransport(transportEndpoint, {\n websocket: websocket\n });\n if (!this._transport.supported()) {\n this._debug('websocket transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'webtransport') {\n this._debug('trying webtransport transport');\n this._transport = new WebtransportTransport(transportEndpoint, {\n webtransport: globalThis.WebTransport,\n decoder: this._codec,\n encoder: this._codec\n });\n if (!this._transport.supported()) {\n this._debug('webtransport transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'http_stream') {\n this._debug('trying http_stream transport');\n this._transport = new HttpStreamTransport(transportEndpoint, {\n fetch: fetchFunc,\n readableStream: readableStream,\n emulationEndpoint: this._config.emulationEndpoint,\n decoder: this._codec,\n encoder: this._codec\n });\n if (!this._transport.supported()) {\n this._debug('http_stream transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'sse') {\n this._debug('trying sse transport');\n this._transport = new SseTransport(transportEndpoint, {\n eventsource: eventsource,\n fetch: fetchFunc,\n emulationEndpoint: this._config.emulationEndpoint,\n });\n if (!this._transport.supported()) {\n this._debug('sse transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'sockjs') {\n this._debug('trying sockjs');\n this._transport = new SockjsTransport(transportEndpoint, {\n sockjs: sockjs,\n sockjsOptions: this._config.sockjsOptions\n });\n if (!this._transport.supported()) {\n this._debug('sockjs transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else {\n throw new Error('unknown transport ' + transportName);\n }\n break;\n }\n }\n\n const self = this;\n const transport = this._transport;\n const transportId = this._nextTransportId();\n self._debug(\"id of transport\", transportId);\n let wasOpen = false;\n const initialCommands: any[] = [];\n\n if (this._transport.emulation()) {\n const connectCommand = self._sendConnect(true);\n initialCommands.push(connectCommand);\n }\n\n this._setNetworkEvents();\n\n const initialData = this._codec.encodeCommands(initialCommands);\n\n this._transportClosed = false;\n\n let connectTimeout: any;\n connectTimeout = setTimeout(function () {\n transport.close();\n }, this._config.timeout);\n\n this._transport.initialize(this._codecName(), {\n onOpen: function () {\n if (connectTimeout) {\n clearTimeout(connectTimeout);\n connectTimeout = null;\n }\n if (self._transportId != transportId) {\n self._debug('open callback from non-actual transport');\n transport.close();\n return;\n }\n wasOpen = true;\n self._debug(transport.subName(), 'transport open');\n if (transport.emulation()) {\n return;\n }\n self._transportIsOpen = true;\n self._transportWasOpen = true;\n self.startBatching();\n self._sendConnect(false);\n self._sendSubscribeCommands();\n self.stopBatching();\n //@ts-ignore must be used only for debug and test purposes. Exposed only for non-emulation transport.\n self.emit('__centrifuge_debug:connect_frame_sent', {})\n },\n onError: function (e: any) {\n if (self._transportId != transportId) {\n self._debug('error callback from non-actual transport');\n return;\n }\n self._debug('transport level error', e);\n },\n onClose: function (closeEvent) {\n if (connectTimeout) {\n clearTimeout(connectTimeout);\n connectTimeout = null;\n }\n if (self._transportId != transportId) {\n self._debug('close callback from non-actual transport');\n return;\n }\n self._debug(transport.subName(), 'transport closed');\n self._transportClosed = true;\n self._transportIsOpen = false;\n\n let reason = 'connection closed';\n let needReconnect = true;\n let code = 0;\n\n if (closeEvent && 'code' in closeEvent && closeEvent.code) {\n code = closeEvent.code;\n }\n\n if (closeEvent && closeEvent.reason) {\n try {\n const advice = JSON.parse(closeEvent.reason);\n reason = advice.reason;\n needReconnect = advice.reconnect;\n } catch (e) {\n reason = closeEvent.reason;\n if ((code >= 3500 && code < 4000) || (code >= 4500 && code < 5000)) {\n needReconnect = false;\n }\n }\n }\n\n if (code < 3000) {\n if (code === 1009) {\n code = disconnectedCodes.messageSizeLimit;\n reason = 'message size limit exceeded';\n needReconnect = false;\n } else {\n code = connectingCodes.transportClosed;\n reason = 'transport closed';\n }\n if (self._emulation && !self._transportWasOpen) {\n self._currentTransportIndex++;\n if (self._currentTransportIndex >= self._transports.length) {\n self._triedAllTransports = true;\n self._currentTransportIndex = 0;\n }\n }\n } else {\n // Codes >= 3000 are sent from a server application level.\n self._transportWasOpen = true;\n }\n\n if (self._isConnecting() && !wasOpen) {\n self.emit('error', {\n type: 'transport',\n error: {\n code: errorCodes.transportClosed,\n message: 'transport closed'\n },\n transport: transport.name()\n });\n }\n\n self._reconnecting = false;\n self._disconnect(code, reason, needReconnect);\n },\n onMessage: function (data) {\n self._dataReceived(data);\n }\n }, initialData);\n //@ts-ignore must be used only for debug and test purposes.\n self.emit('__centrifuge_debug:transport_initialized', {})\n }\n\n private _sendConnect(skipSending: boolean): any {\n const connectCommand = this._constructConnectCommand();\n const self = this;\n this._call(connectCommand, skipSending).then(resolveCtx => {\n const result = resolveCtx.reply.connect;\n self._connectResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._connectError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n return connectCommand;\n }\n\n private _startReconnecting() {\n this._debug('start reconnecting');\n if (!this._isConnecting()) {\n this._debug('stop reconnecting: client not in connecting state');\n return;\n }\n if (this._reconnecting) {\n this._debug('reconnect already in progress, return from reconnect routine');\n return;\n }\n if (this._transportClosed === false) {\n this._debug('waiting for transport close');\n return;\n }\n\n this._reconnecting = true;\n const emptyToken = this._token === '';\n const needTokenRefresh = this._refreshRequired || (emptyToken && this._config.getToken !== null);\n if (!needTokenRefresh) {\n if (this._config.getData) {\n this._config.getData().then(data => {\n if (!this._isConnecting()) {\n return;\n }\n this._data = data;\n this._initializeTransport();\n })\n .catch(e => this._handleGetDataError(e));\n } else {\n this._initializeTransport();\n }\n return;\n }\n\n const self = this;\n this._getToken().then(function (token: string) {\n if (!self._isConnecting()) {\n return;\n }\n if (token == null || token == undefined) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n self._debug('connection token refreshed');\n if (self._config.getData) {\n self._config.getData().then(function (data: any) {\n if (!self._isConnecting()) {\n return;\n }\n self._data = data;\n self._initializeTransport();\n })\n .catch(e => self._handleGetDataError(e));\n } else {\n self._initializeTransport();\n }\n }).catch(function (e) {\n if (!self._isConnecting()) {\n return;\n }\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n 'type': 'connectToken',\n 'error': {\n code: errorCodes.clientConnectToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n const delay = self._getReconnectDelay();\n self._debug('error on getting connection token, reconnect after ' + delay + ' milliseconds', e);\n self._reconnecting = false;\n self._reconnectTimeout = setTimeout(() => {\n self._startReconnecting();\n }, delay);\n });\n }\n\n private _handleGetDataError(e: any): void {\n if (e instanceof UnauthorizedError) {\n this._failUnauthorized();\n return;\n }\n this.emit('error', {\n type: 'connectData',\n error: {\n code: errorCodes.badConfiguration,\n message: e?.toString() || ''\n }\n });\n const delay = this._getReconnectDelay();\n this._debug('error on getting connect data, reconnect after ' + delay + ' milliseconds', e);\n this._reconnecting = false;\n this._reconnectTimeout = setTimeout(() => {\n this._startReconnecting();\n }, delay);\n }\n\n private _connectError(err: any) {\n if (this.state !== State.Connecting) {\n return;\n }\n if (err.code === 109) { // token expired.\n // next connect attempt will try to refresh token.\n this._refreshRequired = true;\n }\n if (err.code < 100 || err.temporary === true || err.code === 109) {\n this.emit('error', {\n 'type': 'connect',\n 'error': err\n });\n this._debug('closing transport due to connect error');\n this._disconnect(err.code, err.message, true);\n } else {\n this._disconnect(err.code, err.message, false);\n }\n }\n\n private _scheduleReconnect() {\n if (!this._isConnecting()) {\n return;\n }\n let isInitialHandshake = false;\n if (this._emulation && !this._transportWasOpen && !this._triedAllTransports) {\n isInitialHandshake = true;\n }\n let delay = this._getReconnectDelay();\n if (isInitialHandshake) {\n delay = 0;\n }\n this._debug('reconnect after ' + delay + ' milliseconds');\n this._clearReconnectTimeout();\n this._reconnectTimeout = setTimeout(() => {\n this._startReconnecting();\n }, delay);\n }\n\n private _constructConnectCommand(): any {\n const req: any = {};\n\n if (this._token) {\n req.token = this._token;\n }\n if (this._data) {\n req.data = this._data;\n }\n if (this._config.name) {\n req.name = this._config.name;\n }\n if (this._config.version) {\n req.version = this._config.version;\n }\n if (Object.keys(this._config.headers).length > 0) {\n req.headers = this._config.headers;\n }\n\n const subs = {};\n let hasSubs = false;\n for (const channel in this._serverSubs) {\n if (this._serverSubs.hasOwnProperty(channel) && this._serverSubs[channel].recoverable) {\n hasSubs = true;\n const sub = {\n 'recover': true\n };\n if (this._serverSubs[channel].offset) {\n sub['offset'] = this._serverSubs[channel].offset;\n }\n if (this._serverSubs[channel].epoch) {\n sub['epoch'] = this._serverSubs[channel].epoch;\n }\n subs[channel] = sub;\n }\n }\n if (hasSubs) {\n req.subs = subs;\n }\n return {\n connect: req\n };\n }\n\n private _getHistoryRequest(channel: string, options?: HistoryOptions) {\n const req: any = {\n channel: channel\n };\n if (options !== undefined) {\n if (options.since) {\n req.since = {\n offset: options.since.offset\n };\n if (options.since.epoch) {\n req.since.epoch = options.since.epoch;\n }\n }\n if (options.limit !== undefined) {\n req.limit = options.limit;\n }\n if (options.reverse === true) {\n req.reverse = true;\n }\n }\n return req;\n }\n\n private _methodCall(): any {\n if (this._isConnected()) {\n return Promise.resolve();\n }\n return new Promise((res, rej) => {\n const timeout = setTimeout(function () {\n rej({ code: errorCodes.timeout, message: 'timeout' });\n }, this._config.timeout);\n this._promises[this._nextPromiseId()] = {\n timeout: timeout,\n resolve: res,\n reject: rej\n };\n });\n }\n\n private _callPromise<T = any>(\n cmd: any,\n resultCB: (reply: any) => T\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n this._call(cmd, false).then(\n (resolveCtx: { reply: any; next?: () => void }) => {\n const result = resultCB(resolveCtx.reply);\n resolve(result);\n resolveCtx.next?.();\n },\n (rejectCtx: { error: any; next?: () => void }) => {\n reject(rejectCtx.error);\n rejectCtx.next?.();\n }\n );\n });\n }\n\n private _dataReceived(data) {\n if (this._serverPing > 0) {\n this._waitServerPing();\n }\n const replies = this._codec.decodeReplies(data);\n // We have to guarantee order of events in replies processing - i.e. start processing\n // next reply only when we finished processing of current one. Without syncing things in\n // this way we could get wrong publication events order as reply promises resolve\n // on next loop tick so for loop continues before we finished emitting all reply events.\n this._dispatchPromise = this._dispatchPromise.then(() => {\n let finishDispatch;\n this._dispatchPromise = new Promise(resolve => {\n finishDispatch = resolve;\n });\n this._dispatchSynchronized(replies, finishDispatch);\n });\n }\n\n private _dispatchSynchronized(replies: any[], finishDispatch: any) {\n let p: Promise<unknown> = Promise.resolve();\n for (const i in replies) {\n if (replies.hasOwnProperty(i)) {\n p = p.then(() => {\n return this._dispatchReply(replies[i]);\n });\n }\n }\n p = p.then(() => {\n finishDispatch();\n });\n }\n\n private _dispatchReply(reply: any) {\n let next: any;\n const p = new Promise(resolve => {\n next = resolve;\n });\n\n if (reply === undefined || reply === null) {\n this._debug('dispatch: got undefined or null reply');\n next();\n return p;\n }\n\n const id = reply.id;\n\n if (id && id > 0) {\n this._handleReply(reply, next);\n } else {\n if (!reply.push) {\n this._handleServerPing(next);\n } else {\n this._handlePush(reply.push, next);\n }\n }\n\n return p;\n }\n\n private _call(cmd: any, skipSending: boolean): Promise<CallResolveContext> {\n return new Promise((resolve, reject) => {\n cmd.id = this._nextCommandId();\n\n this._registerCall(\n cmd.id,\n resolve as (value: CallResolveContext) => void,\n reject as (reason: CallRejectContext) => void\n );\n\n if (!skipSending) {\n this._addCommand(cmd);\n }\n });\n }\n\n private _startConnecting() {\n this._debug('start connecting');\n if (this._setState(State.Connecting)) {\n this.emit('connecting', { code: connectingCodes.connectCalled, reason: 'connect called' });\n }\n this._client = null;\n this._startReconnecting();\n }\n\n private _disconnect(code: number, reason: string, reconnect: boolean) {\n if (this._isDisconnected()) {\n return;\n }\n // we mark transport is closed right away, because _clearConnectedState will move subscriptions to subscribing state\n // if transport will still be open at this time, subscribe frames will be sent to closing transport\n this._transportIsOpen = false;\n const previousState = this.state;\n this._reconnecting = false;\n\n const ctx = {\n code: code,\n reason: reason\n };\n\n let needEvent = false;\n\n if (reconnect) {\n needEvent = this._setState(State.Connecting);\n } else {\n needEvent = this._setState(State.Disconnected);\n this._rejectPromises({ code: errorCodes.clientDisconnected, message: 'disconnected' });\n }\n\n this._clearOutgoingRequests();\n\n if (previousState === State.Connecting) {\n this._clearReconnectTimeout();\n }\n if (previousState === State.Connected) {\n this._clearConnectedState();\n }\n\n if (needEvent) {\n if (this._isConnecting()) {\n this.emit('connecting', ctx);\n } else {\n this.emit('disconnected', ctx);\n }\n }\n\n if (this._transport) {\n this._debug(\"closing existing transport\");\n const transport = this._transport;\n this._transport = null;\n transport.close(); // Close only after setting this._transport to null to avoid recursion when calling transport close().\n // Need to mark as closed here, because connect call may be sync called after disconnect,\n // transport onClose callback will not be called yet\n this._transportClosed = true;\n this._nextTransportId();\n } else {\n this._debug(\"no transport to close\");\n }\n this._scheduleReconnect();\n }\n\n private _failUnauthorized() {\n this._disconnect(disconnectedCodes.unauthorized, 'unauthorized', false);\n }\n\n private _getToken(): Promise<string> {\n this._debug('get connection token');\n if (!this._config.getToken) {\n this.emit('error', {\n type: 'configuration',\n error: {\n code: errorCodes.badConfiguration,\n message: 'token expired but no getToken function set in the configuration'\n }\n });\n return Promise.reject(new UnauthorizedError(''));\n }\n return this._config.getToken({});\n }\n\n private _refresh() {\n const clientId = this._client;\n const self = this;\n this._getToken().then(function (token) {\n if (clientId !== self._client) {\n return;\n }\n if (!token) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n self._debug('connection token refreshed');\n\n if (!self._isConnected()) {\n return;\n }\n\n const cmd = {\n refresh: { token: self._token }\n };\n\n self._call(cmd, false).then(resolveCtx => {\n const result = resolveCtx.reply.refresh;\n self._refreshResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._refreshError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n }).catch(function (e) {\n if (!self._isConnected()) {\n return;\n }\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n type: 'refreshToken',\n error: {\n code: errorCodes.clientRefreshToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n self._refreshTimeout = setTimeout(() => self._refresh(), self._getRefreshRetryDelay());\n });\n }\n\n private _refreshError(err: any) {\n if (err.code < 100 || err.temporary === true) {\n this.emit('error', {\n type: 'refresh',\n error: err\n });\n this._refreshTimeout = setTimeout(() => this._refresh(), this._getRefreshRetryDelay());\n } else {\n this._disconnect(err.code, err.message, false);\n }\n }\n\n private _getRefreshRetryDelay() {\n return backoff(0, 5000, 10000);\n }\n\n private _refreshResponse(result: any) {\n if (this._refreshTimeout) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n if (result.expires) {\n this._client = result.client;\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private _removeSubscription(sub: Subscription | null) {\n if (sub === null) {\n return;\n }\n delete this._subs[sub.channel];\n }\n\n protected _unsubscribe(sub: Subscription) {\n if (!this._transportIsOpen) {\n return Promise.resolve();\n }\n const req = {\n channel: sub.channel\n };\n const cmd = { unsubscribe: req };\n\n const self = this;\n\n const unsubscribePromise = new Promise<void>((resolve, _) => {\n this._call(cmd, false).then(resolveCtx => {\n resolve()\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n resolve()\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n self._disconnect(connectingCodes.unsubscribeError, 'unsubscribe error', true);\n });\n });\n\n return unsubscribePromise;\n }\n\n private _getSub(channel: string) {\n const sub = this._subs[channel];\n if (!sub) {\n return null;\n }\n return sub;\n }\n\n private _isServerSub(channel: string) {\n return this._serverSubs[channel] !== undefined;\n }\n\n private _sendSubscribeCommands(): any[] {\n const commands: any[] = [];\n for (const channel in this._subs) {\n if (!this._subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = this._subs[channel];\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n if (sub._inflight === true) {\n continue;\n }\n if (sub.state === SubscriptionState.Subscribing) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n const cmd = sub._subscribe();\n if (cmd) {\n commands.push(cmd);\n }\n }\n }\n return commands;\n }\n\n private _connectResponse(result: any) {\n this._transportIsOpen = true;\n this._transportWasOpen = true;\n this._reconnectAttempts = 0;\n this._refreshRequired = false;\n\n if (this._isConnected()) {\n return;\n }\n\n this._client = result.client;\n this._setState(State.Connected);\n\n if (this._refreshTimeout) {\n clearTimeout(this._refreshTimeout);\n }\n if (result.expires) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n\n this._session = result.session;\n this._node = result.node;\n\n this.startBatching();\n this._sendSubscribeCommands();\n this.stopBatching();\n\n const ctx: any = {\n client: result.client,\n transport: this._transport.subName()\n };\n if (result.data) {\n ctx.data = result.data;\n }\n\n this.emit('connected', ctx);\n\n this._resolvePromises();\n\n this._processServerSubs(result.subs || {});\n\n if (result.ping && result.ping > 0) {\n this._serverPing = result.ping * 1000;\n this._sendPong = result.pong === true;\n this._waitServerPing();\n } else {\n this._serverPing = 0;\n }\n }\n\n private _processServerSubs(subs: Record<string, any>) {\n for (const channel in subs) {\n if (!subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = subs[channel];\n this._serverSubs[channel] = {\n 'offset': sub.offset,\n 'epoch': sub.epoch,\n 'recoverable': sub.recoverable || false\n };\n const subCtx = this._getSubscribeContext(channel, sub);\n this.emit('subscribed', subCtx);\n }\n\n for (const channel in subs) {\n if (!subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = subs[channel];\n if (sub.recovered) {\n const pubs = sub.publications;\n if (pubs && pubs.length > 0) {\n for (const i in pubs) {\n if (pubs.hasOwnProperty(i)) {\n this._handlePublication(channel, pubs[i]);\n }\n }\n }\n }\n }\n\n for (const channel in this._serverSubs) {\n if (!this._serverSubs.hasOwnProperty(channel)) {\n continue;\n }\n if (!subs[channel]) {\n this.emit('unsubscribed', { channel: channel });\n delete this._serverSubs[channel];\n }\n }\n }\n\n private _clearRefreshTimeout() {\n if (this._refreshTimeout !== null) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n }\n\n private _clearReconnectTimeout() {\n if (this._reconnectTimeout !== null) {\n clearTimeout(this._reconnectTimeout);\n this._reconnectTimeout = null;\n }\n }\n\n private _clearServerPingTimeout() {\n if (this._serverPingTimeout !== null) {\n clearTimeout(this._serverPingTimeout);\n this._serverPingTimeout = null;\n }\n }\n\n private _waitServerPing() {\n if (this._config.maxServerPingDelay === 0) {\n return;\n }\n if (!this._isConnected()) {\n return;\n }\n this._clearServerPingTimeout();\n this._serverPingTimeout = setTimeout(() => {\n if (!this._isConnected()) {\n return;\n }\n this._disconnect(connectingCodes.noPing, 'no ping', true);\n }, this._serverPing + this._config.maxServerPingDelay);\n }\n\n private _getSubscribeContext(channel: string, result: any): SubscribedContext {\n const ctx: any = {\n channel: channel,\n positioned: false,\n recoverable: false,\n wasRecovering: false,\n recovered: false,\n hasRecoveredPublications: false,\n };\n if (result.recovered) {\n ctx.recovered = true;\n }\n if (result.positioned) {\n ctx.positioned = true;\n }\n if (result.recoverable) {\n ctx.recoverable = true;\n }\n if (result.was_recovering) {\n ctx.wasRecovering = true;\n }\n let epoch = '';\n if ('epoch' in result) {\n epoch = result.epoch;\n }\n let offset = 0;\n if ('offset' in result) {\n offset = result.offset;\n }\n if (ctx.positioned || ctx.recoverable) {\n ctx.streamPosition = {\n 'offset': offset,\n 'epoch': epoch\n };\n }\n if (Array.isArray(result.publications) && result.publications.length > 0) {\n ctx.hasRecoveredPublications = true;\n }\n if (result.data) {\n ctx.data = result.data;\n }\n return ctx;\n }\n\n private _handleReply(reply: any, next: any) {\n const id = reply.id;\n if (!(id in this._callbacks)) {\n next();\n return;\n }\n const callbacks = this._callbacks[id];\n clearTimeout(this._callbacks[id].timeout);\n delete this._callbacks[id];\n\n if (!errorExists(reply)) {\n const callback = callbacks.callback;\n if (!callback) {\n return;\n }\n callback({ reply, next });\n } else {\n const errback = callbacks.errback;\n if (!errback) {\n next();\n return;\n }\n const error = {code: reply.error.code, message: reply.error.message || '', temporary: reply.error.temporary || false}\n errback({ error, next });\n }\n }\n\n private _handleJoin(channel: string, join: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = { channel: channel, info: this._getJoinLeaveContext(join.info) };\n this.emit('join', ctx);\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handleJoin(join);\n }\n\n private _handleLeave(channel: string, leave: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = { channel: channel, info: this._getJoinLeaveContext(leave.info) };\n this.emit('leave', ctx);\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handleLeave(leave);\n }\n\n private _handleUnsubscribe(channel: string, unsubscribe: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n delete this._serverSubs[channel];\n this.emit('unsubscribed', { channel: channel });\n }\n return;\n }\n if (unsubscribe.code < 2500) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setUnsubscribed(unsubscribe.code, unsubscribe.reason, false);\n } else {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setSubscribing(unsubscribe.code, unsubscribe.reason);\n }\n }\n\n private _handleSubscribe(channel: string, sub: any) {\n this._serverSubs[channel] = {\n 'offset': sub.offset,\n 'epoch': sub.epoch,\n 'recoverable': sub.recoverable || false\n };\n this.emit('subscribed', this._getSubscribeContext(channel, sub));\n }\n\n private _handleDisconnect(disconnect: any) {\n const code = disconnect.code;\n let reconnect = true;\n if ((code >= 3500 && code < 4000) || (code >= 4500 && code < 5000)) {\n reconnect = false;\n }\n this._disconnect(code, disconnect.reason, reconnect);\n }\n\n private _getPublicationContext(channel: string, pub: any) {\n const ctx: any = {\n channel: channel,\n data: pub.data\n };\n if (pub.offset) {\n ctx.offset = pub.offset;\n }\n if (pub.info) {\n ctx.info = this._getJoinLeaveContext(pub.info);\n }\n if (pub.tags) {\n ctx.tags = pub.tags;\n }\n return ctx;\n }\n\n private _getJoinLeaveContext(clientInfo: any) {\n const info: any = {\n client: clientInfo.client,\n user: clientInfo.user\n };\n const connInfo = clientInfo['conn_info'];\n if (connInfo) {\n info.connInfo = connInfo;\n }\n const chanInfo = clientInfo['chan_info'];\n if (chanInfo) {\n info.chanInfo = chanInfo;\n }\n return info;\n }\n\n private _handlePublication(channel: string, pub: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = this._getPublicationContext(channel, pub);\n this.emit('publication', ctx);\n if (pub.offset !== undefined) {\n this._serverSubs[channel].offset = pub.offset;\n }\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handlePublication(pub);\n }\n\n private _handleMessage(message: any) {\n this.emit('message', { data: message.data });\n }\n\n private _handleServerPing(next: any) {\n if (this._sendPong) {\n const cmd = {};\n this._transportSendCommands([cmd]);\n }\n next();\n }\n\n private _handlePush(data: any, next: any) {\n const channel = data.channel;\n if (data.pub) {\n this._handlePublication(channel, data.pub);\n } else if (data.message) {\n this._handleMessage(data.message);\n } else if (data.join) {\n this._handleJoin(channel, data.join);\n } else if (data.leave) {\n this._handleLeave(channel, data.leave);\n } else if (data.unsubscribe) {\n this._handleUnsubscribe(channel, data.unsubscribe);\n } else if (data.subscribe) {\n this._handleSubscribe(channel, data.subscribe);\n } else if (data.disconnect) {\n this._handleDisconnect(data.disconnect);\n }\n next();\n }\n\n private _flush() {\n const commands = this._commands.slice(0);\n this._commands = [];\n this._transportSendCommands(commands);\n }\n\n private _createErrorObject(code: number, message: string, temporary?: boolean) {\n const errObject: any = {\n code: code,\n message: message\n };\n if (temporary) {\n errObject.temporary = true;\n }\n return errObject;\n }\n\n private _registerCall(id: number, callback: any, errback: any) {\n this._callbacks[id] = {\n callback: callback,\n errback: errback,\n timeout: null\n };\n this._callbacks[id].timeout = setTimeout(() => {\n delete this._callbacks[id];\n if (isFunction(errback)) {\n errback({ error: this._createErrorObject(errorCodes.timeout, 'timeout') });\n }\n }, this._config.timeout);\n }\n\n private _addCommand(command: any) {\n if (this._batching) {\n this._commands.push(command);\n } else {\n this._transportSendCommands([command]);\n }\n }\n\n private _nextPromiseId() {\n return ++this._promiseId;\n }\n\n private _nextTransportId() {\n return ++this._transportId;\n }\n\n private _resolvePromises() {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].resolve();\n delete this._promises[id];\n }\n }\n\n private _rejectPromises(err: any) {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].reject(err);\n delete this._promises[id];\n }\n }\n}\n\nCentrifuge.SubscriptionState = SubscriptionState;\nCentrifuge.State = State\nCentrifuge.UnauthorizedError = UnauthorizedError;\n", "import { Writer, Reader } from 'protobufjs/minimal'\nimport { centrifugal } from './client_proto';\nimport { applyDelta } from './fossil';\n\nconst Command = centrifugal.centrifuge.protocol.Command;\nconst Reply = centrifugal.centrifuge.protocol.Reply;\nconst EmulationRequest = centrifugal.centrifuge.protocol.EmulationRequest;\n\n/** @internal */\nexport class ProtobufCodec {\n name(): string {\n return 'protobuf';\n }\n\n encodeEmulationRequest(req: centrifugal.centrifuge.protocol.IEmulationRequest): Uint8Array {\n const writer = Writer.create();\n EmulationRequest.encode(req, writer);\n return writer.finish();\n }\n\n encodeCommands(commands: centrifugal.centrifuge.protocol.ICommand[]): Uint8Array {\n const writer = Writer.create();\n for (const command of commands) {\n writer.fork();\n Command.encodeDelimited(command, writer);\n }\n return writer.finish();\n }\n\n encodeReplies(replies: centrifugal.centrifuge.protocol.IReply[]): Uint8Array {\n const writer = Writer.create();\n for (const reply of replies) {\n writer.fork();\n Reply.encodeDelimited(reply, writer);\n }\n return writer.finish();\n }\n\n decodeReplies(data: ArrayBuffer | Uint8Array): centrifugal.centrifuge.protocol.Reply[] {\n const replies: centrifugal.centrifuge.protocol.Reply[] = [];\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n const reply = Reply.decodeDelimited(reader);\n replies.push(reply);\n }\n return replies;\n }\n\n decodeCommands(data: ArrayBuffer | Uint8Array): centrifugal.centrifuge.protocol.Command[] {\n const commands: centrifugal.centrifuge.protocol.Command[] = [];\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n const reply = Command.decodeDelimited(reader);\n commands.push(reply);\n }\n return commands;\n }\n\n decodeReply(data: ArrayBuffer | Uint8Array): { ok: true; pos: number } | { ok: false } {\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n Reply.decodeDelimited(reader);\n return {\n ok: true,\n pos: reader.pos\n };\n }\n return {\n ok: false\n };\n }\n\n applyDeltaIfNeeded(pub: centrifugal.centrifuge.protocol.IPublication, prevValue: Uint8Array): { newData: Uint8Array; newPrevValue: Uint8Array } {\n let newData: Uint8Array, newPrevValue: Uint8Array;\n if (pub.delta) {\n // binary delta.\n const valueArray = applyDelta(prevValue, pub.data!);\n newData = new Uint8Array(valueArray)\n newPrevValue = valueArray;\n } else {\n // full binary data.\n newData = pub.data!;\n newPrevValue = pub.data!;\n }\n return { newData, newPrevValue }\n }\n}\n", "/*eslint-disable*/\nimport * as $protobuf from \"protobufjs/minimal\";\n\n// Common aliases\nconst $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n// Exported root namespace\nconst $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\nexport const centrifugal = $root.centrifugal = (() => {\n\n /**\n * Namespace centrifugal.\n * @exports centrifugal\n * @namespace\n */\n const centrifugal = {};\n\n centrifugal.centrifuge = (function() {\n\n /**\n * Namespace centrifuge.\n * @memberof centrifugal\n * @namespace\n */\n const centrifuge = {};\n\n centrifuge.protocol = (function() {\n\n /**\n * Namespace protocol.\n * @memberof centrifugal.centrifuge\n * @namespace\n */\n const protocol = {};\n\n protocol.Error = (function() {\n\n /**\n * Properties of an Error.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IError\n * @property {number|null} [code] Error code\n * @property {string|null} [message] Error message\n * @property {boolean|null} [temporary] Error temporary\n */\n\n /**\n * Constructs a new Error.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an Error.\n * @implements IError\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IError=} [properties] Properties to set\n */\n function Error(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Error code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.code = 0;\n\n /**\n * Error message.\n * @member {string} message\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.message = \"\";\n\n /**\n * Error temporary.\n * @member {boolean} temporary\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.temporary = false;\n\n /**\n * Encodes the specified Error message. Does not implicitly {@link centrifugal.centrifuge.protocol.Error.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {centrifugal.centrifuge.protocol.IError} message Error message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Error.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code);\n if (message.message != null && Object.hasOwnProperty.call(message, \"message\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);\n if (message.temporary != null && Object.hasOwnProperty.call(message, \"temporary\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.temporary);\n return writer;\n };\n\n /**\n * Encodes the specified Error message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Error.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {centrifugal.centrifuge.protocol.IError} message Error message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Error.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Error message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Error} Error\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Error.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Error();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.code = reader.uint32();\n break;\n }\n case 2: {\n message.message = reader.string();\n break;\n }\n case 3: {\n message.temporary = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Error message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Error} Error\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Error.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Error message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Error.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.message != null && message.hasOwnProperty(\"message\"))\n if (!$util.isString(message.message))\n return \"message: string expected\";\n if (message.temporary != null && message.hasOwnProperty(\"temporary\"))\n if (typeof message.temporary !== \"boolean\")\n return \"temporary: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Error\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Error\";\n };\n\n return Error;\n })();\n\n protocol.EmulationRequest = (function() {\n\n /**\n * Properties of an EmulationRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IEmulationRequest\n * @property {string|null} [node] EmulationRequest node\n * @property {string|null} [session] EmulationRequest session\n * @property {Uint8Array|null} [data] EmulationRequest data\n */\n\n /**\n * Constructs a new EmulationRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an EmulationRequest.\n * @implements IEmulationRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest=} [properties] Properties to set\n */\n function EmulationRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EmulationRequest node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.node = \"\";\n\n /**\n * EmulationRequest session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.session = \"\";\n\n /**\n * EmulationRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified EmulationRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.EmulationRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest} message EmulationRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EmulationRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.node);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.session);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified EmulationRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.EmulationRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest} message EmulationRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EmulationRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EmulationRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.EmulationRequest} EmulationRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EmulationRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.EmulationRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.node = reader.string();\n break;\n }\n case 2: {\n message.session = reader.string();\n break;\n }\n case 3: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EmulationRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.EmulationRequest} EmulationRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EmulationRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EmulationRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EmulationRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for EmulationRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n EmulationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.EmulationRequest\";\n };\n\n return EmulationRequest;\n })();\n\n protocol.Command = (function() {\n\n /**\n * Properties of a Command.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ICommand\n * @property {number|null} [id] Command id\n * @property {centrifugal.centrifuge.protocol.IConnectRequest|null} [connect] Command connect\n * @property {centrifugal.centrifuge.protocol.ISubscribeRequest|null} [subscribe] Command subscribe\n * @property {centrifugal.centrifuge.protocol.IUnsubscribeRequest|null} [unsubscribe] Command unsubscribe\n * @property {centrifugal.centrifuge.protocol.IPublishRequest|null} [publish] Command publish\n * @property {centrifugal.centrifuge.protocol.IPresenceRequest|null} [presence] Command presence\n * @property {centrifugal.centrifuge.protocol.IPresenceStatsRequest|null} [presence_stats] Command presence_stats\n * @property {centrifugal.centrifuge.protocol.IHistoryRequest|null} [history] Command history\n * @property {centrifugal.centrifuge.protocol.IPingRequest|null} [ping] Command ping\n * @property {centrifugal.centrifuge.protocol.ISendRequest|null} [send] Command send\n * @property {centrifugal.centrifuge.protocol.IRPCRequest|null} [rpc] Command rpc\n * @property {centrifugal.centrifuge.protocol.IRefreshRequest|null} [refresh] Command refresh\n * @property {centrifugal.centrifuge.protocol.ISubRefreshRequest|null} [sub_refresh] Command sub_refresh\n */\n\n /**\n * Constructs a new Command.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Command.\n * @implements ICommand\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ICommand=} [properties] Properties to set\n */\n function Command(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Command id.\n * @member {number} id\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.id = 0;\n\n /**\n * Command connect.\n * @member {centrifugal.centrifuge.protocol.IConnectRequest|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.connect = null;\n\n /**\n * Command subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribeRequest|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.subscribe = null;\n\n /**\n * Command unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribeRequest|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.unsubscribe = null;\n\n /**\n * Command publish.\n * @member {centrifugal.centrifuge.protocol.IPublishRequest|null|undefined} publish\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.publish = null;\n\n /**\n * Command presence.\n * @member {centrifugal.centrifuge.protocol.IPresenceRequest|null|undefined} presence\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.presence = null;\n\n /**\n * Command presence_stats.\n * @member {centrifugal.centrifuge.protocol.IPresenceStatsRequest|null|undefined} presence_stats\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.presence_stats = null;\n\n /**\n * Command history.\n * @member {centrifugal.centrifuge.protocol.IHistoryRequest|null|undefined} history\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.history = null;\n\n /**\n * Command ping.\n * @member {centrifugal.centrifuge.protocol.IPingRequest|null|undefined} ping\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.ping = null;\n\n /**\n * Command send.\n * @member {centrifugal.centrifuge.protocol.ISendRequest|null|undefined} send\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.send = null;\n\n /**\n * Command rpc.\n * @member {centrifugal.centrifuge.protocol.IRPCRequest|null|undefined} rpc\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.rpc = null;\n\n /**\n * Command refresh.\n * @member {centrifugal.centrifuge.protocol.IRefreshRequest|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.refresh = null;\n\n /**\n * Command sub_refresh.\n * @member {centrifugal.centrifuge.protocol.ISubRefreshRequest|null|undefined} sub_refresh\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.sub_refresh = null;\n\n /**\n * Encodes the specified Command message. Does not implicitly {@link centrifugal.centrifuge.protocol.Command.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {centrifugal.centrifuge.protocol.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.id != null && Object.hasOwnProperty.call(message, \"id\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id);\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.ConnectRequest.encode(message.connect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.SubscribeRequest.encode(message.subscribe, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.encode(message.unsubscribe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.publish != null && Object.hasOwnProperty.call(message, \"publish\"))\n $root.centrifugal.centrifuge.protocol.PublishRequest.encode(message.publish, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n $root.centrifugal.centrifuge.protocol.PresenceRequest.encode(message.presence, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.presence_stats != null && Object.hasOwnProperty.call(message, \"presence_stats\"))\n $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.encode(message.presence_stats, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.history != null && Object.hasOwnProperty.call(message, \"history\"))\n $root.centrifugal.centrifuge.protocol.HistoryRequest.encode(message.history, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n $root.centrifugal.centrifuge.protocol.PingRequest.encode(message.ping, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.send != null && Object.hasOwnProperty.call(message, \"send\"))\n $root.centrifugal.centrifuge.protocol.SendRequest.encode(message.send, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n if (message.rpc != null && Object.hasOwnProperty.call(message, \"rpc\"))\n $root.centrifugal.centrifuge.protocol.RPCRequest.encode(message.rpc, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.RefreshRequest.encode(message.refresh, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();\n if (message.sub_refresh != null && Object.hasOwnProperty.call(message, \"sub_refresh\"))\n $root.centrifugal.centrifuge.protocol.SubRefreshRequest.encode(message.sub_refresh, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Command message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Command.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {centrifugal.centrifuge.protocol.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Command();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.id = reader.uint32();\n break;\n }\n case 4: {\n message.connect = $root.centrifugal.centrifuge.protocol.ConnectRequest.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.SubscribeRequest.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.publish = $root.centrifugal.centrifuge.protocol.PublishRequest.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.presence = $root.centrifugal.centrifuge.protocol.PresenceRequest.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.presence_stats = $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.history = $root.centrifugal.centrifuge.protocol.HistoryRequest.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.ping = $root.centrifugal.centrifuge.protocol.PingRequest.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.send = $root.centrifugal.centrifuge.protocol.SendRequest.decode(reader, reader.uint32());\n break;\n }\n case 13: {\n message.rpc = $root.centrifugal.centrifuge.protocol.RPCRequest.decode(reader, reader.uint32());\n break;\n }\n case 14: {\n message.refresh = $root.centrifugal.centrifuge.protocol.RefreshRequest.decode(reader, reader.uint32());\n break;\n }\n case 15: {\n message.sub_refresh = $root.centrifugal.centrifuge.protocol.SubRefreshRequest.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Command message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Command.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\"))\n if (!$util.isInteger(message.id))\n return \"id: integer expected\";\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.ConnectRequest.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeRequest.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.publish != null && message.hasOwnProperty(\"publish\")) {\n let error = $root.centrifugal.centrifuge.protocol.PublishRequest.verify(message.publish);\n if (error)\n return \"publish.\" + error;\n }\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceRequest.verify(message.presence);\n if (error)\n return \"presence.\" + error;\n }\n if (message.presence_stats != null && message.hasOwnProperty(\"presence_stats\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.verify(message.presence_stats);\n if (error)\n return \"presence_stats.\" + error;\n }\n if (message.history != null && message.hasOwnProperty(\"history\")) {\n let error = $root.centrifugal.centrifuge.protocol.HistoryRequest.verify(message.history);\n if (error)\n return \"history.\" + error;\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\")) {\n let error = $root.centrifugal.centrifuge.protocol.PingRequest.verify(message.ping);\n if (error)\n return \"ping.\" + error;\n }\n if (message.send != null && message.hasOwnProperty(\"send\")) {\n let error = $root.centrifugal.centrifuge.protocol.SendRequest.verify(message.send);\n if (error)\n return \"send.\" + error;\n }\n if (message.rpc != null && message.hasOwnProperty(\"rpc\")) {\n let error = $root.centrifugal.centrifuge.protocol.RPCRequest.verify(message.rpc);\n if (error)\n return \"rpc.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.RefreshRequest.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n if (message.sub_refresh != null && message.hasOwnProperty(\"sub_refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubRefreshRequest.verify(message.sub_refresh);\n if (error)\n return \"sub_refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Command\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Command.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Command\";\n };\n\n return Command;\n })();\n\n protocol.Reply = (function() {\n\n /**\n * Properties of a Reply.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IReply\n * @property {number|null} [id] Reply id\n * @property {centrifugal.centrifuge.protocol.IError|null} [error] Reply error\n * @property {centrifugal.centrifuge.protocol.IPush|null} [push] Reply push\n * @property {centrifugal.centrifuge.protocol.IConnectResult|null} [connect] Reply connect\n * @property {centrifugal.centrifuge.protocol.ISubscribeResult|null} [subscribe] Reply subscribe\n * @property {centrifugal.centrifuge.protocol.IUnsubscribeResult|null} [unsubscribe] Reply unsubscribe\n * @property {centrifugal.centrifuge.protocol.IPublishResult|null} [publish] Reply publish\n * @property {centrifugal.centrifuge.protocol.IPresenceResult|null} [presence] Reply presence\n * @property {centrifugal.centrifuge.protocol.IPresenceStatsResult|null} [presence_stats] Reply presence_stats\n * @property {centrifugal.centrifuge.protocol.IHistoryResult|null} [history] Reply history\n * @property {centrifugal.centrifuge.protocol.IPingResult|null} [ping] Reply ping\n * @property {centrifugal.centrifuge.protocol.IRPCResult|null} [rpc] Reply rpc\n * @property {centrifugal.centrifuge.protocol.IRefreshResult|null} [refresh] Reply refresh\n * @property {centrifugal.centrifuge.protocol.ISubRefreshResult|null} [sub_refresh] Reply sub_refresh\n */\n\n /**\n * Constructs a new Reply.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Reply.\n * @implements IReply\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IReply=} [properties] Properties to set\n */\n function Reply(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Reply id.\n * @member {number} id\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.id = 0;\n\n /**\n * Reply error.\n * @member {centrifugal.centrifuge.protocol.IError|null|undefined} error\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.error = null;\n\n /**\n * Reply push.\n * @member {centrifugal.centrifuge.protocol.IPush|null|undefined} push\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.push = null;\n\n /**\n * Reply connect.\n * @member {centrifugal.centrifuge.protocol.IConnectResult|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.connect = null;\n\n /**\n * Reply subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribeResult|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.subscribe = null;\n\n /**\n * Reply unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribeResult|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.unsubscribe = null;\n\n /**\n * Reply publish.\n * @member {centrifugal.centrifuge.protocol.IPublishResult|null|undefined} publish\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.publish = null;\n\n /**\n * Reply presence.\n * @member {centrifugal.centrifuge.protocol.IPresenceResult|null|undefined} presence\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.presence = null;\n\n /**\n * Reply presence_stats.\n * @member {centrifugal.centrifuge.protocol.IPresenceStatsResult|null|undefined} presence_stats\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.presence_stats = null;\n\n /**\n * Reply history.\n * @member {centrifugal.centrifuge.protocol.IHistoryResult|null|undefined} history\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.history = null;\n\n /**\n * Reply ping.\n * @member {centrifugal.centrifuge.protocol.IPingResult|null|undefined} ping\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.ping = null;\n\n /**\n * Reply rpc.\n * @member {centrifugal.centrifuge.protocol.IRPCResult|null|undefined} rpc\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.rpc = null;\n\n /**\n * Reply refresh.\n * @member {centrifugal.centrifuge.protocol.IRefreshResult|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.refresh = null;\n\n /**\n * Reply sub_refresh.\n * @member {centrifugal.centrifuge.protocol.ISubRefreshResult|null|undefined} sub_refresh\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.sub_refresh = null;\n\n /**\n * Encodes the specified Reply message. Does not implicitly {@link centrifugal.centrifuge.protocol.Reply.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {centrifugal.centrifuge.protocol.IReply} message Reply message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reply.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.id != null && Object.hasOwnProperty.call(message, \"id\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id);\n if (message.error != null && Object.hasOwnProperty.call(message, \"error\"))\n $root.centrifugal.centrifuge.protocol.Error.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.push != null && Object.hasOwnProperty.call(message, \"push\"))\n $root.centrifugal.centrifuge.protocol.Push.encode(message.push, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.ConnectResult.encode(message.connect, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subscribe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.UnsubscribeResult.encode(message.unsubscribe, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.publish != null && Object.hasOwnProperty.call(message, \"publish\"))\n $root.centrifugal.centrifuge.protocol.PublishResult.encode(message.publish, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n $root.centrifugal.centrifuge.protocol.PresenceResult.encode(message.presence, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.presence_stats != null && Object.hasOwnProperty.call(message, \"presence_stats\"))\n $root.centrifugal.centrifuge.protocol.PresenceStatsResult.encode(message.presence_stats, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.history != null && Object.hasOwnProperty.call(message, \"history\"))\n $root.centrifugal.centrifuge.protocol.HistoryResult.encode(message.history, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n $root.centrifugal.centrifuge.protocol.PingResult.encode(message.ping, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n if (message.rpc != null && Object.hasOwnProperty.call(message, \"rpc\"))\n $root.centrifugal.centrifuge.protocol.RPCResult.encode(message.rpc, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.RefreshResult.encode(message.refresh, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();\n if (message.sub_refresh != null && Object.hasOwnProperty.call(message, \"sub_refresh\"))\n $root.centrifugal.centrifuge.protocol.SubRefreshResult.encode(message.sub_refresh, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Reply message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Reply.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {centrifugal.centrifuge.protocol.IReply} message Reply message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reply.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Reply message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Reply} Reply\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reply.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Reply();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.id = reader.uint32();\n break;\n }\n case 2: {\n message.error = $root.centrifugal.centrifuge.protocol.Error.decode(reader, reader.uint32());\n break;\n }\n case 4: {\n message.push = $root.centrifugal.centrifuge.protocol.Push.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.connect = $root.centrifugal.centrifuge.protocol.ConnectResult.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.UnsubscribeResult.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.publish = $root.centrifugal.centrifuge.protocol.PublishResult.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.presence = $root.centrifugal.centrifuge.protocol.PresenceResult.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.presence_stats = $root.centrifugal.centrifuge.protocol.PresenceStatsResult.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.history = $root.centrifugal.centrifuge.protocol.HistoryResult.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.ping = $root.centrifugal.centrifuge.protocol.PingResult.decode(reader, reader.uint32());\n break;\n }\n case 13: {\n message.rpc = $root.centrifugal.centrifuge.protocol.RPCResult.decode(reader, reader.uint32());\n break;\n }\n case 14: {\n message.refresh = $root.centrifugal.centrifuge.protocol.RefreshResult.decode(reader, reader.uint32());\n break;\n }\n case 15: {\n message.sub_refresh = $root.centrifugal.centrifuge.protocol.SubRefreshResult.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Reply message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Reply} Reply\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reply.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Reply message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Reply.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\"))\n if (!$util.isInteger(message.id))\n return \"id: integer expected\";\n if (message.error != null && message.hasOwnProperty(\"error\")) {\n let error = $root.centrifugal.centrifuge.protocol.Error.verify(message.error);\n if (error)\n return \"error.\" + error;\n }\n if (message.push != null && message.hasOwnProperty(\"push\")) {\n let error = $root.centrifugal.centrifuge.protocol.Push.verify(message.push);\n if (error)\n return \"push.\" + error;\n }\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.ConnectResult.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.UnsubscribeResult.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.publish != null && message.hasOwnProperty(\"publish\")) {\n let error = $root.centrifugal.centrifuge.protocol.PublishResult.verify(message.publish);\n if (error)\n return \"publish.\" + error;\n }\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceResult.verify(message.presence);\n if (error)\n return \"presence.\" + error;\n }\n if (message.presence_stats != null && message.hasOwnProperty(\"presence_stats\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceStatsResult.verify(message.presence_stats);\n if (error)\n return \"presence_stats.\" + error;\n }\n if (message.history != null && message.hasOwnProperty(\"history\")) {\n let error = $root.centrifugal.centrifuge.protocol.HistoryResult.verify(message.history);\n if (error)\n return \"history.\" + error;\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\")) {\n let error = $root.centrifugal.centrifuge.protocol.PingResult.verify(message.ping);\n if (error)\n return \"ping.\" + error;\n }\n if (message.rpc != null && message.hasOwnProperty(\"rpc\")) {\n let error = $root.centrifugal.centrifuge.protocol.RPCResult.verify(message.rpc);\n if (error)\n return \"rpc.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.RefreshResult.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n if (message.sub_refresh != null && message.hasOwnProperty(\"sub_refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubRefreshResult.verify(message.sub_refresh);\n if (error)\n return \"sub_refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Reply\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Reply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Reply\";\n };\n\n return Reply;\n })();\n\n protocol.Push = (function() {\n\n /**\n * Properties of a Push.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPush\n * @property {string|null} [channel] Push channel\n * @property {centrifugal.centrifuge.protocol.IPublication|null} [pub] Push pub\n * @property {centrifugal.centrifuge.protocol.IJoin|null} [join] Push join\n * @property {centrifugal.centrifuge.protocol.ILeave|null} [leave] Push leave\n * @property {centrifugal.centrifuge.protocol.IUnsubscribe|null} [unsubscribe] Push unsubscribe\n * @property {centrifugal.centrifuge.protocol.IMessage|null} [message] Push message\n * @property {centrifugal.centrifuge.protocol.ISubscribe|null} [subscribe] Push subscribe\n * @property {centrifugal.centrifuge.protocol.IConnect|null} [connect] Push connect\n * @property {centrifugal.centrifuge.protocol.IDisconnect|null} [disconnect] Push disconnect\n * @property {centrifugal.centrifuge.protocol.IRefresh|null} [refresh] Push refresh\n */\n\n /**\n * Constructs a new Push.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Push.\n * @implements IPush\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPush=} [properties] Properties to set\n */\n function Push(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Push channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.channel = \"\";\n\n /**\n * Push pub.\n * @member {centrifugal.centrifuge.protocol.IPublication|null|undefined} pub\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.pub = null;\n\n /**\n * Push join.\n * @member {centrifugal.centrifuge.protocol.IJoin|null|undefined} join\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.join = null;\n\n /**\n * Push leave.\n * @member {centrifugal.centrifuge.protocol.ILeave|null|undefined} leave\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.leave = null;\n\n /**\n * Push unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribe|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.unsubscribe = null;\n\n /**\n * Push message.\n * @member {centrifugal.centrifuge.protocol.IMessage|null|undefined} message\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.message = null;\n\n /**\n * Push subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribe|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.subscribe = null;\n\n /**\n * Push connect.\n * @member {centrifugal.centrifuge.protocol.IConnect|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.connect = null;\n\n /**\n * Push disconnect.\n * @member {centrifugal.centrifuge.protocol.IDisconnect|null|undefined} disconnect\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.disconnect = null;\n\n /**\n * Push refresh.\n * @member {centrifugal.centrifuge.protocol.IRefresh|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.refresh = null;\n\n /**\n * Encodes the specified Push message. Does not implicitly {@link centrifugal.centrifuge.protocol.Push.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {centrifugal.centrifuge.protocol.IPush} message Push message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Push.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel);\n if (message.pub != null && Object.hasOwnProperty.call(message, \"pub\"))\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.pub, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.join != null && Object.hasOwnProperty.call(message, \"join\"))\n $root.centrifugal.centrifuge.protocol.Join.encode(message.join, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.leave != null && Object.hasOwnProperty.call(message, \"leave\"))\n $root.centrifugal.centrifuge.protocol.Leave.encode(message.leave, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.Unsubscribe.encode(message.unsubscribe, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.message != null && Object.hasOwnProperty.call(message, \"message\"))\n $root.centrifugal.centrifuge.protocol.Message.encode(message.message, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.Subscribe.encode(message.subscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.Connect.encode(message.connect, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.disconnect != null && Object.hasOwnProperty.call(message, \"disconnect\"))\n $root.centrifugal.centrifuge.protocol.Disconnect.encode(message.disconnect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.Refresh.encode(message.refresh, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Push message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Push.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {centrifugal.centrifuge.protocol.IPush} message Push message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Push.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Push message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Push} Push\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Push.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Push();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n message.channel = reader.string();\n break;\n }\n case 4: {\n message.pub = $root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.join = $root.centrifugal.centrifuge.protocol.Join.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.leave = $root.centrifugal.centrifuge.protocol.Leave.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.Unsubscribe.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.message = $root.centrifugal.centrifuge.protocol.Message.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.Subscribe.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.connect = $root.centrifugal.centrifuge.protocol.Connect.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.disconnect = $root.centrifugal.centrifuge.protocol.Disconnect.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.refresh = $root.centrifugal.centrifuge.protocol.Refresh.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Push message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Push} Push\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Push.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Push message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Push.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.pub != null && message.hasOwnProperty(\"pub\")) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.pub);\n if (error)\n return \"pub.\" + error;\n }\n if (message.join != null && message.hasOwnProperty(\"join\")) {\n let error = $root.centrifugal.centrifuge.protocol.Join.verify(message.join);\n if (error)\n return \"join.\" + error;\n }\n if (message.leave != null && message.hasOwnProperty(\"leave\")) {\n let error = $root.centrifugal.centrifuge.protocol.Leave.verify(message.leave);\n if (error)\n return \"leave.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.Unsubscribe.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.message != null && message.hasOwnProperty(\"message\")) {\n let error = $root.centrifugal.centrifuge.protocol.Message.verify(message.message);\n if (error)\n return \"message.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.Subscribe.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.Connect.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.disconnect != null && message.hasOwnProperty(\"disconnect\")) {\n let error = $root.centrifugal.centrifuge.protocol.Disconnect.verify(message.disconnect);\n if (error)\n return \"disconnect.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.Refresh.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Push\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Push.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Push\";\n };\n\n return Push;\n })();\n\n protocol.ClientInfo = (function() {\n\n /**\n * Properties of a ClientInfo.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IClientInfo\n * @property {string|null} [user] ClientInfo user\n * @property {string|null} [client] ClientInfo client\n * @property {Uint8Array|null} [conn_info] ClientInfo conn_info\n * @property {Uint8Array|null} [chan_info] ClientInfo chan_info\n */\n\n /**\n * Constructs a new ClientInfo.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ClientInfo.\n * @implements IClientInfo\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IClientInfo=} [properties] Properties to set\n */\n function ClientInfo(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ClientInfo user.\n * @member {string} user\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.user = \"\";\n\n /**\n * ClientInfo client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.client = \"\";\n\n /**\n * ClientInfo conn_info.\n * @member {Uint8Array} conn_info\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.conn_info = $util.newBuffer([]);\n\n /**\n * ClientInfo chan_info.\n * @member {Uint8Array} chan_info\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.chan_info = $util.newBuffer([]);\n\n /**\n * Encodes the specified ClientInfo message. Does not implicitly {@link centrifugal.centrifuge.protocol.ClientInfo.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {centrifugal.centrifuge.protocol.IClientInfo} message ClientInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ClientInfo.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.user != null && Object.hasOwnProperty.call(message, \"user\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.user);\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.client);\n if (message.conn_info != null && Object.hasOwnProperty.call(message, \"conn_info\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conn_info);\n if (message.chan_info != null && Object.hasOwnProperty.call(message, \"chan_info\"))\n writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.chan_info);\n return writer;\n };\n\n /**\n * Encodes the specified ClientInfo message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ClientInfo.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {centrifugal.centrifuge.protocol.IClientInfo} message ClientInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ClientInfo.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ClientInfo message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ClientInfo} ClientInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ClientInfo.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ClientInfo();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.user = reader.string();\n break;\n }\n case 2: {\n message.client = reader.string();\n break;\n }\n case 3: {\n message.conn_info = reader.bytes();\n break;\n }\n case 4: {\n message.chan_info = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ClientInfo message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ClientInfo} ClientInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ClientInfo.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ClientInfo message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ClientInfo.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.user != null && message.hasOwnProperty(\"user\"))\n if (!$util.isString(message.user))\n return \"user: string expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.conn_info != null && message.hasOwnProperty(\"conn_info\"))\n if (!(message.conn_info && typeof message.conn_info.length === \"number\" || $util.isString(message.conn_info)))\n return \"conn_info: buffer expected\";\n if (message.chan_info != null && message.hasOwnProperty(\"chan_info\"))\n if (!(message.chan_info && typeof message.chan_info.length === \"number\" || $util.isString(message.chan_info)))\n return \"chan_info: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for ClientInfo\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ClientInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ClientInfo\";\n };\n\n return ClientInfo;\n })();\n\n protocol.Publication = (function() {\n\n /**\n * Properties of a Publication.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublication\n * @property {Uint8Array|null} [data] Publication data\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Publication info\n * @property {number|Long|null} [offset] Publication offset\n * @property {Object.<string,string>|null} [tags] Publication tags\n * @property {boolean|null} [delta] Publication delta\n * @property {number|Long|null} [time] Publication time\n * @property {string|null} [channel] Publication channel\n */\n\n /**\n * Constructs a new Publication.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Publication.\n * @implements IPublication\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublication=} [properties] Properties to set\n */\n function Publication(properties) {\n this.tags = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Publication data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.data = $util.newBuffer([]);\n\n /**\n * Publication info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.info = null;\n\n /**\n * Publication offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Publication tags.\n * @member {Object.<string,string>} tags\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.tags = $util.emptyObject;\n\n /**\n * Publication delta.\n * @member {boolean} delta\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.delta = false;\n\n /**\n * Publication time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Publication channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.channel = \"\";\n\n /**\n * Encodes the specified Publication message. Does not implicitly {@link centrifugal.centrifuge.protocol.Publication.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublication} message Publication message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Publication.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data);\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.offset);\n if (message.tags != null && Object.hasOwnProperty.call(message, \"tags\"))\n for (let keys = Object.keys(message.tags), i = 0; i < keys.length; ++i)\n writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim();\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.delta);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 9, wireType 0 =*/72).int64(message.time);\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified Publication message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Publication.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublication} message Publication message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Publication.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Publication message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Publication} Publication\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Publication.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Publication(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 4: {\n message.data = reader.bytes();\n break;\n }\n case 5: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.offset = reader.uint64();\n break;\n }\n case 7: {\n if (message.tags === $util.emptyObject)\n message.tags = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = \"\";\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = reader.string();\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.tags[key] = value;\n break;\n }\n case 8: {\n message.delta = reader.bool();\n break;\n }\n case 9: {\n message.time = reader.int64();\n break;\n }\n case 10: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Publication message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Publication} Publication\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Publication.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Publication message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Publication.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.tags != null && message.hasOwnProperty(\"tags\")) {\n if (!$util.isObject(message.tags))\n return \"tags: object expected\";\n let key = Object.keys(message.tags);\n for (let i = 0; i < key.length; ++i)\n if (!$util.isString(message.tags[key[i]]))\n return \"tags: string{k:string} expected\";\n }\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (typeof message.delta !== \"boolean\")\n return \"delta: boolean expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Publication\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Publication.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Publication\";\n };\n\n return Publication;\n })();\n\n protocol.Join = (function() {\n\n /**\n * Properties of a Join.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IJoin\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Join info\n */\n\n /**\n * Constructs a new Join.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Join.\n * @implements IJoin\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IJoin=} [properties] Properties to set\n */\n function Join(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Join info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Join\n * @instance\n */\n Join.prototype.info = null;\n\n /**\n * Encodes the specified Join message. Does not implicitly {@link centrifugal.centrifuge.protocol.Join.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {centrifugal.centrifuge.protocol.IJoin} message Join message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Join.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Join message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Join.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {centrifugal.centrifuge.protocol.IJoin} message Join message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Join.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Join message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Join} Join\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Join.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Join();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Join message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Join} Join\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Join.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Join message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Join.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Join\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Join.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Join\";\n };\n\n return Join;\n })();\n\n protocol.Leave = (function() {\n\n /**\n * Properties of a Leave.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ILeave\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Leave info\n */\n\n /**\n * Constructs a new Leave.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Leave.\n * @implements ILeave\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ILeave=} [properties] Properties to set\n */\n function Leave(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Leave info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @instance\n */\n Leave.prototype.info = null;\n\n /**\n * Encodes the specified Leave message. Does not implicitly {@link centrifugal.centrifuge.protocol.Leave.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {centrifugal.centrifuge.protocol.ILeave} message Leave message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Leave.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Leave message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Leave.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {centrifugal.centrifuge.protocol.ILeave} message Leave message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Leave.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Leave message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Leave} Leave\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Leave.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Leave();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Leave message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Leave} Leave\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Leave.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Leave message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Leave.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Leave\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Leave.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Leave\";\n };\n\n return Leave;\n })();\n\n protocol.Unsubscribe = (function() {\n\n /**\n * Properties of an Unsubscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribe\n * @property {number|null} [code] Unsubscribe code\n * @property {string|null} [reason] Unsubscribe reason\n */\n\n /**\n * Constructs a new Unsubscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an Unsubscribe.\n * @implements IUnsubscribe\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe=} [properties] Properties to set\n */\n function Unsubscribe(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Unsubscribe code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @instance\n */\n Unsubscribe.prototype.code = 0;\n\n /**\n * Unsubscribe reason.\n * @member {string} reason\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @instance\n */\n Unsubscribe.prototype.reason = \"\";\n\n /**\n * Encodes the specified Unsubscribe message. Does not implicitly {@link centrifugal.centrifuge.protocol.Unsubscribe.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe} message Unsubscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Unsubscribe.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code);\n if (message.reason != null && Object.hasOwnProperty.call(message, \"reason\"))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason);\n return writer;\n };\n\n /**\n * Encodes the specified Unsubscribe message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Unsubscribe.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe} message Unsubscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Unsubscribe.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Unsubscribe message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Unsubscribe} Unsubscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Unsubscribe.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Unsubscribe();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n message.code = reader.uint32();\n break;\n }\n case 3: {\n message.reason = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Unsubscribe message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Unsubscribe} Unsubscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Unsubscribe.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Unsubscribe message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Unsubscribe.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.reason != null && message.hasOwnProperty(\"reason\"))\n if (!$util.isString(message.reason))\n return \"reason: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Unsubscribe\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Unsubscribe.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Unsubscribe\";\n };\n\n return Unsubscribe;\n })();\n\n protocol.Subscribe = (function() {\n\n /**\n * Properties of a Subscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribe\n * @property {boolean|null} [recoverable] Subscribe recoverable\n * @property {string|null} [epoch] Subscribe epoch\n * @property {number|Long|null} [offset] Subscribe offset\n * @property {boolean|null} [positioned] Subscribe positioned\n * @property {Uint8Array|null} [data] Subscribe data\n */\n\n /**\n * Constructs a new Subscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Subscribe.\n * @implements ISubscribe\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribe=} [properties] Properties to set\n */\n function Subscribe(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Subscribe recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.recoverable = false;\n\n /**\n * Subscribe epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.epoch = \"\";\n\n /**\n * Subscribe offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Subscribe positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.positioned = false;\n\n /**\n * Subscribe data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified Subscribe message. Does not implicitly {@link centrifugal.centrifuge.protocol.Subscribe.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribe} message Subscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Subscribe.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.recoverable);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.offset);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 6, wireType 0 =*/48).bool(message.positioned);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified Subscribe message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Subscribe.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribe} message Subscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Subscribe.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Subscribe message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Subscribe} Subscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Subscribe.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Subscribe();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.recoverable = reader.bool();\n break;\n }\n case 4: {\n message.epoch = reader.string();\n break;\n }\n case 5: {\n message.offset = reader.uint64();\n break;\n }\n case 6: {\n message.positioned = reader.bool();\n break;\n }\n case 7: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Subscribe message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Subscribe} Subscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Subscribe.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Subscribe message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Subscribe.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Subscribe\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Subscribe.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Subscribe\";\n };\n\n return Subscribe;\n })();\n\n protocol.Message = (function() {\n\n /**\n * Properties of a Message.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IMessage\n * @property {Uint8Array|null} [data] Message data\n */\n\n /**\n * Constructs a new Message.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Message.\n * @implements IMessage\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IMessage=} [properties] Properties to set\n */\n function Message(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Message data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Message\n * @instance\n */\n Message.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified Message message. Does not implicitly {@link centrifugal.centrifuge.protocol.Message.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {centrifugal.centrifuge.protocol.IMessage} message Message message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Message.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified Message message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Message.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {centrifugal.centrifuge.protocol.IMessage} message Message message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Message.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Message message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Message} Message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Message.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Message();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Message message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Message} Message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Message.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Message message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Message.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Message\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Message\";\n };\n\n return Message;\n })();\n\n protocol.Connect = (function() {\n\n /**\n * Properties of a Connect.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnect\n * @property {string|null} [client] Connect client\n * @property {string|null} [version] Connect version\n * @property {Uint8Array|null} [data] Connect data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>|null} [subs] Connect subs\n * @property {boolean|null} [expires] Connect expires\n * @property {number|null} [ttl] Connect ttl\n * @property {number|null} [ping] Connect ping\n * @property {boolean|null} [pong] Connect pong\n * @property {string|null} [session] Connect session\n * @property {string|null} [node] Connect node\n * @property {number|Long|null} [time] Connect time\n */\n\n /**\n * Constructs a new Connect.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Connect.\n * @implements IConnect\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnect=} [properties] Properties to set\n */\n function Connect(properties) {\n this.subs = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Connect client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.client = \"\";\n\n /**\n * Connect version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.version = \"\";\n\n /**\n * Connect data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.data = $util.newBuffer([]);\n\n /**\n * Connect subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>} subs\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.subs = $util.emptyObject;\n\n /**\n * Connect expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.expires = false;\n\n /**\n * Connect ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.ttl = 0;\n\n /**\n * Connect ping.\n * @member {number} ping\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.ping = 0;\n\n /**\n * Connect pong.\n * @member {boolean} pong\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.pong = false;\n\n /**\n * Connect session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.session = \"\";\n\n /**\n * Connect node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.node = \"\";\n\n /**\n * Connect time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Encodes the specified Connect message. Does not implicitly {@link centrifugal.centrifuge.protocol.Connect.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnect} message Connect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Connect.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 5, wireType 0 =*/40).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ttl);\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.ping);\n if (message.pong != null && Object.hasOwnProperty.call(message, \"pong\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.pong);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 9, wireType 2 =*/74).string(message.session);\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.node);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 11, wireType 0 =*/88).int64(message.time);\n return writer;\n };\n\n /**\n * Encodes the specified Connect message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Connect.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnect} message Connect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Connect.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Connect message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Connect} Connect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Connect.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Connect(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.data = reader.bytes();\n break;\n }\n case 4: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 5: {\n message.expires = reader.bool();\n break;\n }\n case 6: {\n message.ttl = reader.uint32();\n break;\n }\n case 7: {\n message.ping = reader.uint32();\n break;\n }\n case 8: {\n message.pong = reader.bool();\n break;\n }\n case 9: {\n message.session = reader.string();\n break;\n }\n case 10: {\n message.node = reader.string();\n break;\n }\n case 11: {\n message.time = reader.int64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Connect message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Connect} Connect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Connect.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Connect message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Connect.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.ping != null && message.hasOwnProperty(\"ping\"))\n if (!$util.isInteger(message.ping))\n return \"ping: integer expected\";\n if (message.pong != null && message.hasOwnProperty(\"pong\"))\n if (typeof message.pong !== \"boolean\")\n return \"pong: boolean expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Connect\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Connect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Connect\";\n };\n\n return Connect;\n })();\n\n protocol.Disconnect = (function() {\n\n /**\n * Properties of a Disconnect.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IDisconnect\n * @property {number|null} [code] Disconnect code\n * @property {string|null} [reason] Disconnect reason\n * @property {boolean|null} [reconnect] Disconnect reconnect\n */\n\n /**\n * Constructs a new Disconnect.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Disconnect.\n * @implements IDisconnect\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IDisconnect=} [properties] Properties to set\n */\n function Disconnect(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Disconnect code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.code = 0;\n\n /**\n * Disconnect reason.\n * @member {string} reason\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.reason = \"\";\n\n /**\n * Disconnect reconnect.\n * @member {boolean} reconnect\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.reconnect = false;\n\n /**\n * Encodes the specified Disconnect message. Does not implicitly {@link centrifugal.centrifuge.protocol.Disconnect.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {centrifugal.centrifuge.protocol.IDisconnect} message Disconnect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Disconnect.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code);\n if (message.reason != null && Object.hasOwnProperty.call(message, \"reason\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason);\n if (message.reconnect != null && Object.hasOwnProperty.call(message, \"reconnect\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.reconnect);\n return writer;\n };\n\n /**\n * Encodes the specified Disconnect message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Disconnect.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {centrifugal.centrifuge.protocol.IDisconnect} message Disconnect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Disconnect.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Disconnect message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Disconnect} Disconnect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Disconnect.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Disconnect();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.code = reader.uint32();\n break;\n }\n case 2: {\n message.reason = reader.string();\n break;\n }\n case 3: {\n message.reconnect = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Disconnect message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Disconnect} Disconnect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Disconnect.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Disconnect message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Disconnect.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.reason != null && message.hasOwnProperty(\"reason\"))\n if (!$util.isString(message.reason))\n return \"reason: string expected\";\n if (message.reconnect != null && message.hasOwnProperty(\"reconnect\"))\n if (typeof message.reconnect !== \"boolean\")\n return \"reconnect: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Disconnect\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Disconnect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Disconnect\";\n };\n\n return Disconnect;\n })();\n\n protocol.Refresh = (function() {\n\n /**\n * Properties of a Refresh.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefresh\n * @property {boolean|null} [expires] Refresh expires\n * @property {number|null} [ttl] Refresh ttl\n */\n\n /**\n * Constructs a new Refresh.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Refresh.\n * @implements IRefresh\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefresh=} [properties] Properties to set\n */\n function Refresh(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Refresh expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @instance\n */\n Refresh.prototype.expires = false;\n\n /**\n * Refresh ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @instance\n */\n Refresh.prototype.ttl = 0;\n\n /**\n * Encodes the specified Refresh message. Does not implicitly {@link centrifugal.centrifuge.protocol.Refresh.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefresh} message Refresh message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Refresh.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified Refresh message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Refresh.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefresh} message Refresh message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Refresh.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Refresh message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Refresh} Refresh\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Refresh.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Refresh();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Refresh message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Refresh} Refresh\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Refresh.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Refresh message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Refresh.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Refresh\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Refresh.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Refresh\";\n };\n\n return Refresh;\n })();\n\n protocol.ConnectRequest = (function() {\n\n /**\n * Properties of a ConnectRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnectRequest\n * @property {string|null} [token] ConnectRequest token\n * @property {Uint8Array|null} [data] ConnectRequest data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeRequest>|null} [subs] ConnectRequest subs\n * @property {string|null} [name] ConnectRequest name\n * @property {string|null} [version] ConnectRequest version\n * @property {Object.<string,string>|null} [headers] ConnectRequest headers\n */\n\n /**\n * Constructs a new ConnectRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ConnectRequest.\n * @implements IConnectRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnectRequest=} [properties] Properties to set\n */\n function ConnectRequest(properties) {\n this.subs = {};\n this.headers = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ConnectRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.token = \"\";\n\n /**\n * ConnectRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * ConnectRequest subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeRequest>} subs\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.subs = $util.emptyObject;\n\n /**\n * ConnectRequest name.\n * @member {string} name\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.name = \"\";\n\n /**\n * ConnectRequest version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.version = \"\";\n\n /**\n * ConnectRequest headers.\n * @member {Object.<string,string>} headers\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.headers = $util.emptyObject;\n\n /**\n * Encodes the specified ConnectRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectRequest} message ConnectRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeRequest.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 5, wireType 2 =*/42).string(message.version);\n if (message.headers != null && Object.hasOwnProperty.call(message, \"headers\"))\n for (let keys = Object.keys(message.headers), i = 0; i < keys.length; ++i)\n writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified ConnectRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectRequest} message ConnectRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ConnectRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ConnectRequest} ConnectRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ConnectRequest(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.token = reader.string();\n break;\n }\n case 2: {\n message.data = reader.bytes();\n break;\n }\n case 3: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeRequest.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 4: {\n message.name = reader.string();\n break;\n }\n case 5: {\n message.version = reader.string();\n break;\n }\n case 6: {\n if (message.headers === $util.emptyObject)\n message.headers = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = \"\";\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = reader.string();\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.headers[key] = value;\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ConnectRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ConnectRequest} ConnectRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ConnectRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ConnectRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeRequest.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.headers != null && message.hasOwnProperty(\"headers\")) {\n if (!$util.isObject(message.headers))\n return \"headers: object expected\";\n let key = Object.keys(message.headers);\n for (let i = 0; i < key.length; ++i)\n if (!$util.isString(message.headers[key[i]]))\n return \"headers: string{k:string} expected\";\n }\n return null;\n };\n\n /**\n * Gets the default type url for ConnectRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ConnectRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ConnectRequest\";\n };\n\n return ConnectRequest;\n })();\n\n protocol.ConnectResult = (function() {\n\n /**\n * Properties of a ConnectResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnectResult\n * @property {string|null} [client] ConnectResult client\n * @property {string|null} [version] ConnectResult version\n * @property {boolean|null} [expires] ConnectResult expires\n * @property {number|null} [ttl] ConnectResult ttl\n * @property {Uint8Array|null} [data] ConnectResult data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>|null} [subs] ConnectResult subs\n * @property {number|null} [ping] ConnectResult ping\n * @property {boolean|null} [pong] ConnectResult pong\n * @property {string|null} [session] ConnectResult session\n * @property {string|null} [node] ConnectResult node\n * @property {number|Long|null} [time] ConnectResult time\n */\n\n /**\n * Constructs a new ConnectResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ConnectResult.\n * @implements IConnectResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnectResult=} [properties] Properties to set\n */\n function ConnectResult(properties) {\n this.subs = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ConnectResult client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.client = \"\";\n\n /**\n * ConnectResult version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.version = \"\";\n\n /**\n * ConnectResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.expires = false;\n\n /**\n * ConnectResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.ttl = 0;\n\n /**\n * ConnectResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.data = $util.newBuffer([]);\n\n /**\n * ConnectResult subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>} subs\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.subs = $util.emptyObject;\n\n /**\n * ConnectResult ping.\n * @member {number} ping\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.ping = 0;\n\n /**\n * ConnectResult pong.\n * @member {boolean} pong\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.pong = false;\n\n /**\n * ConnectResult session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.session = \"\";\n\n /**\n * ConnectResult node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.node = \"\";\n\n /**\n * ConnectResult time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Encodes the specified ConnectResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectResult} message ConnectResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ttl);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.ping);\n if (message.pong != null && Object.hasOwnProperty.call(message, \"pong\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.pong);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 9, wireType 2 =*/74).string(message.session);\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.node);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 11, wireType 0 =*/88).int64(message.time);\n return writer;\n };\n\n /**\n * Encodes the specified ConnectResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectResult} message ConnectResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ConnectResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ConnectResult} ConnectResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ConnectResult(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.expires = reader.bool();\n break;\n }\n case 4: {\n message.ttl = reader.uint32();\n break;\n }\n case 5: {\n message.data = reader.bytes();\n break;\n }\n case 6: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 7: {\n message.ping = reader.uint32();\n break;\n }\n case 8: {\n message.pong = reader.bool();\n break;\n }\n case 9: {\n message.session = reader.string();\n break;\n }\n case 10: {\n message.node = reader.string();\n break;\n }\n case 11: {\n message.time = reader.int64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ConnectResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ConnectResult} ConnectResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ConnectResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ConnectResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\"))\n if (!$util.isInteger(message.ping))\n return \"ping: integer expected\";\n if (message.pong != null && message.hasOwnProperty(\"pong\"))\n if (typeof message.pong !== \"boolean\")\n return \"pong: boolean expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for ConnectResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ConnectResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ConnectResult\";\n };\n\n return ConnectResult;\n })();\n\n protocol.RefreshRequest = (function() {\n\n /**\n * Properties of a RefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefreshRequest\n * @property {string|null} [token] RefreshRequest token\n */\n\n /**\n * Constructs a new RefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RefreshRequest.\n * @implements IRefreshRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest=} [properties] Properties to set\n */\n function RefreshRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RefreshRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @instance\n */\n RefreshRequest.prototype.token = \"\";\n\n /**\n * Encodes the specified RefreshRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest} message RefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);\n return writer;\n };\n\n /**\n * Encodes the specified RefreshRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest} message RefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RefreshRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RefreshRequest} RefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RefreshRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.token = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RefreshRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RefreshRequest} RefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RefreshRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RefreshRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RefreshRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RefreshRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RefreshRequest\";\n };\n\n return RefreshRequest;\n })();\n\n protocol.RefreshResult = (function() {\n\n /**\n * Properties of a RefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefreshResult\n * @property {string|null} [client] RefreshResult client\n * @property {string|null} [version] RefreshResult version\n * @property {boolean|null} [expires] RefreshResult expires\n * @property {number|null} [ttl] RefreshResult ttl\n */\n\n /**\n * Constructs a new RefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RefreshResult.\n * @implements IRefreshResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefreshResult=} [properties] Properties to set\n */\n function RefreshResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RefreshResult client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.client = \"\";\n\n /**\n * RefreshResult version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.version = \"\";\n\n /**\n * RefreshResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.expires = false;\n\n /**\n * RefreshResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.ttl = 0;\n\n /**\n * Encodes the specified RefreshResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshResult} message RefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified RefreshResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshResult} message RefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RefreshResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RefreshResult} RefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RefreshResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.expires = reader.bool();\n break;\n }\n case 4: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RefreshResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RefreshResult} RefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RefreshResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RefreshResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RefreshResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RefreshResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RefreshResult\";\n };\n\n return RefreshResult;\n })();\n\n protocol.SubscribeRequest = (function() {\n\n /**\n * Properties of a SubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribeRequest\n * @property {string|null} [channel] SubscribeRequest channel\n * @property {string|null} [token] SubscribeRequest token\n * @property {boolean|null} [recover] SubscribeRequest recover\n * @property {string|null} [epoch] SubscribeRequest epoch\n * @property {number|Long|null} [offset] SubscribeRequest offset\n * @property {Uint8Array|null} [data] SubscribeRequest data\n * @property {boolean|null} [positioned] SubscribeRequest positioned\n * @property {boolean|null} [recoverable] SubscribeRequest recoverable\n * @property {boolean|null} [join_leave] SubscribeRequest join_leave\n * @property {string|null} [delta] SubscribeRequest delta\n */\n\n /**\n * Constructs a new SubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubscribeRequest.\n * @implements ISubscribeRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest=} [properties] Properties to set\n */\n function SubscribeRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubscribeRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.channel = \"\";\n\n /**\n * SubscribeRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.token = \"\";\n\n /**\n * SubscribeRequest recover.\n * @member {boolean} recover\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.recover = false;\n\n /**\n * SubscribeRequest epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.epoch = \"\";\n\n /**\n * SubscribeRequest offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * SubscribeRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * SubscribeRequest positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.positioned = false;\n\n /**\n * SubscribeRequest recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.recoverable = false;\n\n /**\n * SubscribeRequest join_leave.\n * @member {boolean} join_leave\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.join_leave = false;\n\n /**\n * SubscribeRequest delta.\n * @member {string} delta\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.delta = \"\";\n\n /**\n * Encodes the specified SubscribeRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest} message SubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);\n if (message.recover != null && Object.hasOwnProperty.call(message, \"recover\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recover);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.offset);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.data);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 9, wireType 0 =*/72).bool(message.positioned);\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.recoverable);\n if (message.join_leave != null && Object.hasOwnProperty.call(message, \"join_leave\"))\n writer.uint32(/* id 11, wireType 0 =*/88).bool(message.join_leave);\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 12, wireType 2 =*/98).string(message.delta);\n return writer;\n };\n\n /**\n * Encodes the specified SubscribeRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest} message SubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubscribeRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubscribeRequest} SubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubscribeRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.token = reader.string();\n break;\n }\n case 3: {\n message.recover = reader.bool();\n break;\n }\n case 6: {\n message.epoch = reader.string();\n break;\n }\n case 7: {\n message.offset = reader.uint64();\n break;\n }\n case 8: {\n message.data = reader.bytes();\n break;\n }\n case 9: {\n message.positioned = reader.bool();\n break;\n }\n case 10: {\n message.recoverable = reader.bool();\n break;\n }\n case 11: {\n message.join_leave = reader.bool();\n break;\n }\n case 12: {\n message.delta = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubscribeRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubscribeRequest} SubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubscribeRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubscribeRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n if (message.recover != null && message.hasOwnProperty(\"recover\"))\n if (typeof message.recover !== \"boolean\")\n return \"recover: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.join_leave != null && message.hasOwnProperty(\"join_leave\"))\n if (typeof message.join_leave !== \"boolean\")\n return \"join_leave: boolean expected\";\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (!$util.isString(message.delta))\n return \"delta: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubscribeRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubscribeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubscribeRequest\";\n };\n\n return SubscribeRequest;\n })();\n\n protocol.SubscribeResult = (function() {\n\n /**\n * Properties of a SubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribeResult\n * @property {boolean|null} [expires] SubscribeResult expires\n * @property {number|null} [ttl] SubscribeResult ttl\n * @property {boolean|null} [recoverable] SubscribeResult recoverable\n * @property {string|null} [epoch] SubscribeResult epoch\n * @property {Array.<centrifugal.centrifuge.protocol.IPublication>|null} [publications] SubscribeResult publications\n * @property {boolean|null} [recovered] SubscribeResult recovered\n * @property {number|Long|null} [offset] SubscribeResult offset\n * @property {boolean|null} [positioned] SubscribeResult positioned\n * @property {Uint8Array|null} [data] SubscribeResult data\n * @property {boolean|null} [was_recovering] SubscribeResult was_recovering\n * @property {boolean|null} [delta] SubscribeResult delta\n */\n\n /**\n * Constructs a new SubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubscribeResult.\n * @implements ISubscribeResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult=} [properties] Properties to set\n */\n function SubscribeResult(properties) {\n this.publications = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubscribeResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.expires = false;\n\n /**\n * SubscribeResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.ttl = 0;\n\n /**\n * SubscribeResult recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.recoverable = false;\n\n /**\n * SubscribeResult epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.epoch = \"\";\n\n /**\n * SubscribeResult publications.\n * @member {Array.<centrifugal.centrifuge.protocol.IPublication>} publications\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.publications = $util.emptyArray;\n\n /**\n * SubscribeResult recovered.\n * @member {boolean} recovered\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.recovered = false;\n\n /**\n * SubscribeResult offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * SubscribeResult positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.positioned = false;\n\n /**\n * SubscribeResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.data = $util.newBuffer([]);\n\n /**\n * SubscribeResult was_recovering.\n * @member {boolean} was_recovering\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.was_recovering = false;\n\n /**\n * SubscribeResult delta.\n * @member {boolean} delta\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.delta = false;\n\n /**\n * Encodes the specified SubscribeResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult} message SubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recoverable);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.epoch);\n if (message.publications != null && message.publications.length)\n for (let i = 0; i < message.publications.length; ++i)\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.publications[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.recovered != null && Object.hasOwnProperty.call(message, \"recovered\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.recovered);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.offset);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.positioned);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.data);\n if (message.was_recovering != null && Object.hasOwnProperty.call(message, \"was_recovering\"))\n writer.uint32(/* id 12, wireType 0 =*/96).bool(message.was_recovering);\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 13, wireType 0 =*/104).bool(message.delta);\n return writer;\n };\n\n /**\n * Encodes the specified SubscribeResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult} message SubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubscribeResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubscribeResult} SubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubscribeResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n case 3: {\n message.recoverable = reader.bool();\n break;\n }\n case 6: {\n message.epoch = reader.string();\n break;\n }\n case 7: {\n if (!(message.publications && message.publications.length))\n message.publications = [];\n message.publications.push($root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32()));\n break;\n }\n case 8: {\n message.recovered = reader.bool();\n break;\n }\n case 9: {\n message.offset = reader.uint64();\n break;\n }\n case 10: {\n message.positioned = reader.bool();\n break;\n }\n case 11: {\n message.data = reader.bytes();\n break;\n }\n case 12: {\n message.was_recovering = reader.bool();\n break;\n }\n case 13: {\n message.delta = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubscribeResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubscribeResult} SubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubscribeResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubscribeResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.publications != null && message.hasOwnProperty(\"publications\")) {\n if (!Array.isArray(message.publications))\n return \"publications: array expected\";\n for (let i = 0; i < message.publications.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.publications[i]);\n if (error)\n return \"publications.\" + error;\n }\n }\n if (message.recovered != null && message.hasOwnProperty(\"recovered\"))\n if (typeof message.recovered !== \"boolean\")\n return \"recovered: boolean expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.was_recovering != null && message.hasOwnProperty(\"was_recovering\"))\n if (typeof message.was_recovering !== \"boolean\")\n return \"was_recovering: boolean expected\";\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (typeof message.delta !== \"boolean\")\n return \"delta: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubscribeResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubscribeResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubscribeResult\";\n };\n\n return SubscribeResult;\n })();\n\n protocol.SubRefreshRequest = (function() {\n\n /**\n * Properties of a SubRefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubRefreshRequest\n * @property {string|null} [channel] SubRefreshRequest channel\n * @property {string|null} [token] SubRefreshRequest token\n */\n\n /**\n * Constructs a new SubRefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubRefreshRequest.\n * @implements ISubRefreshRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest=} [properties] Properties to set\n */\n function SubRefreshRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubRefreshRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @instance\n */\n SubRefreshRequest.prototype.channel = \"\";\n\n /**\n * SubRefreshRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @instance\n */\n SubRefreshRequest.prototype.token = \"\";\n\n /**\n * Encodes the specified SubRefreshRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest} message SubRefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);\n return writer;\n };\n\n /**\n * Encodes the specified SubRefreshRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest} message SubRefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubRefreshRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubRefreshRequest} SubRefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubRefreshRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.token = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubRefreshRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubRefreshRequest} SubRefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubRefreshRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubRefreshRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubRefreshRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubRefreshRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubRefreshRequest\";\n };\n\n return SubRefreshRequest;\n })();\n\n protocol.SubRefreshResult = (function() {\n\n /**\n * Properties of a SubRefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubRefreshResult\n * @property {boolean|null} [expires] SubRefreshResult expires\n * @property {number|null} [ttl] SubRefreshResult ttl\n */\n\n /**\n * Constructs a new SubRefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubRefreshResult.\n * @implements ISubRefreshResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult=} [properties] Properties to set\n */\n function SubRefreshResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubRefreshResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @instance\n */\n SubRefreshResult.prototype.expires = false;\n\n /**\n * SubRefreshResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @instance\n */\n SubRefreshResult.prototype.ttl = 0;\n\n /**\n * Encodes the specified SubRefreshResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult} message SubRefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified SubRefreshResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult} message SubRefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubRefreshResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubRefreshResult} SubRefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubRefreshResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubRefreshResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubRefreshResult} SubRefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubRefreshResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubRefreshResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubRefreshResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubRefreshResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubRefreshResult\";\n };\n\n return SubRefreshResult;\n })();\n\n protocol.UnsubscribeRequest = (function() {\n\n /**\n * Properties of an UnsubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribeRequest\n * @property {string|null} [channel] UnsubscribeRequest channel\n */\n\n /**\n * Constructs a new UnsubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an UnsubscribeRequest.\n * @implements IUnsubscribeRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest=} [properties] Properties to set\n */\n function UnsubscribeRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * UnsubscribeRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @instance\n */\n UnsubscribeRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified UnsubscribeRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest} message UnsubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified UnsubscribeRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest} message UnsubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UnsubscribeRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeRequest} UnsubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.UnsubscribeRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an UnsubscribeRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeRequest} UnsubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an UnsubscribeRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UnsubscribeRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for UnsubscribeRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n UnsubscribeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.UnsubscribeRequest\";\n };\n\n return UnsubscribeRequest;\n })();\n\n protocol.UnsubscribeResult = (function() {\n\n /**\n * Properties of an UnsubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribeResult\n */\n\n /**\n * Constructs a new UnsubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an UnsubscribeResult.\n * @implements IUnsubscribeResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult=} [properties] Properties to set\n */\n function UnsubscribeResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified UnsubscribeResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult} message UnsubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified UnsubscribeResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult} message UnsubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UnsubscribeResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeResult} UnsubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.UnsubscribeResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an UnsubscribeResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeResult} UnsubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an UnsubscribeResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UnsubscribeResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for UnsubscribeResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n UnsubscribeResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.UnsubscribeResult\";\n };\n\n return UnsubscribeResult;\n })();\n\n protocol.PublishRequest = (function() {\n\n /**\n * Properties of a PublishRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublishRequest\n * @property {string|null} [channel] PublishRequest channel\n * @property {Uint8Array|null} [data] PublishRequest data\n */\n\n /**\n * Constructs a new PublishRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PublishRequest.\n * @implements IPublishRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublishRequest=} [properties] Properties to set\n */\n function PublishRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PublishRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @instance\n */\n PublishRequest.prototype.channel = \"\";\n\n /**\n * PublishRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @instance\n */\n PublishRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified PublishRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishRequest} message PublishRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishRequest} message PublishRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PublishRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PublishRequest} PublishRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PublishRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PublishRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PublishRequest} PublishRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PublishRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PublishRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PublishRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PublishRequest\";\n };\n\n return PublishRequest;\n })();\n\n protocol.PublishResult = (function() {\n\n /**\n * Properties of a PublishResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublishResult\n */\n\n /**\n * Constructs a new PublishResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PublishResult.\n * @implements IPublishResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublishResult=} [properties] Properties to set\n */\n function PublishResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PublishResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishResult} message PublishResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PublishResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishResult} message PublishResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PublishResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PublishResult} PublishResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PublishResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PublishResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PublishResult} PublishResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PublishResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PublishResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PublishResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PublishResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PublishResult\";\n };\n\n return PublishResult;\n })();\n\n protocol.PresenceRequest = (function() {\n\n /**\n * Properties of a PresenceRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceRequest\n * @property {string|null} [channel] PresenceRequest channel\n */\n\n /**\n * Constructs a new PresenceRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceRequest.\n * @implements IPresenceRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest=} [properties] Properties to set\n */\n function PresenceRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @instance\n */\n PresenceRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified PresenceRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest} message PresenceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest} message PresenceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceRequest} PresenceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceRequest} PresenceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceRequest\";\n };\n\n return PresenceRequest;\n })();\n\n protocol.PresenceResult = (function() {\n\n /**\n * Properties of a PresenceResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceResult\n * @property {Object.<string,centrifugal.centrifuge.protocol.IClientInfo>|null} [presence] PresenceResult presence\n */\n\n /**\n * Constructs a new PresenceResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceResult.\n * @implements IPresenceResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceResult=} [properties] Properties to set\n */\n function PresenceResult(properties) {\n this.presence = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceResult presence.\n * @member {Object.<string,centrifugal.centrifuge.protocol.IClientInfo>} presence\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @instance\n */\n PresenceResult.prototype.presence = $util.emptyObject;\n\n /**\n * Encodes the specified PresenceResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceResult} message PresenceResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n for (let keys = Object.keys(message.presence), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.presence[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n return writer;\n };\n\n /**\n * Encodes the specified PresenceResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceResult} message PresenceResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceResult} PresenceResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceResult(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (message.presence === $util.emptyObject)\n message.presence = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.presence[key] = value;\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceResult} PresenceResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n if (!$util.isObject(message.presence))\n return \"presence: object expected\";\n let key = Object.keys(message.presence);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.presence[key[i]]);\n if (error)\n return \"presence.\" + error;\n }\n }\n return null;\n };\n\n /**\n * Gets the default type url for PresenceResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceResult\";\n };\n\n return PresenceResult;\n })();\n\n protocol.PresenceStatsRequest = (function() {\n\n /**\n * Properties of a PresenceStatsRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceStatsRequest\n * @property {string|null} [channel] PresenceStatsRequest channel\n */\n\n /**\n * Constructs a new PresenceStatsRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceStatsRequest.\n * @implements IPresenceStatsRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest=} [properties] Properties to set\n */\n function PresenceStatsRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceStatsRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @instance\n */\n PresenceStatsRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified PresenceStatsRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest} message PresenceStatsRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceStatsRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest} message PresenceStatsRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceStatsRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsRequest} PresenceStatsRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceStatsRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceStatsRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsRequest} PresenceStatsRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceStatsRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceStatsRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceStatsRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceStatsRequest\";\n };\n\n return PresenceStatsRequest;\n })();\n\n protocol.PresenceStatsResult = (function() {\n\n /**\n * Properties of a PresenceStatsResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceStatsResult\n * @property {number|null} [num_clients] PresenceStatsResult num_clients\n * @property {number|null} [num_users] PresenceStatsResult num_users\n */\n\n /**\n * Constructs a new PresenceStatsResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceStatsResult.\n * @implements IPresenceStatsResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult=} [properties] Properties to set\n */\n function PresenceStatsResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceStatsResult num_clients.\n * @member {number} num_clients\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @instance\n */\n PresenceStatsResult.prototype.num_clients = 0;\n\n /**\n * PresenceStatsResult num_users.\n * @member {number} num_users\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @instance\n */\n PresenceStatsResult.prototype.num_users = 0;\n\n /**\n * Encodes the specified PresenceStatsResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult} message PresenceStatsResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.num_clients != null && Object.hasOwnProperty.call(message, \"num_clients\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.num_clients);\n if (message.num_users != null && Object.hasOwnProperty.call(message, \"num_users\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_users);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceStatsResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult} message PresenceStatsResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceStatsResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsResult} PresenceStatsResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceStatsResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.num_clients = reader.uint32();\n break;\n }\n case 2: {\n message.num_users = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceStatsResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsResult} PresenceStatsResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceStatsResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceStatsResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.num_clients != null && message.hasOwnProperty(\"num_clients\"))\n if (!$util.isInteger(message.num_clients))\n return \"num_clients: integer expected\";\n if (message.num_users != null && message.hasOwnProperty(\"num_users\"))\n if (!$util.isInteger(message.num_users))\n return \"num_users: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceStatsResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceStatsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceStatsResult\";\n };\n\n return PresenceStatsResult;\n })();\n\n protocol.StreamPosition = (function() {\n\n /**\n * Properties of a StreamPosition.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IStreamPosition\n * @property {number|Long|null} [offset] StreamPosition offset\n * @property {string|null} [epoch] StreamPosition epoch\n */\n\n /**\n * Constructs a new StreamPosition.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a StreamPosition.\n * @implements IStreamPosition\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IStreamPosition=} [properties] Properties to set\n */\n function StreamPosition(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * StreamPosition offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @instance\n */\n StreamPosition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * StreamPosition epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @instance\n */\n StreamPosition.prototype.epoch = \"\";\n\n /**\n * Encodes the specified StreamPosition message. Does not implicitly {@link centrifugal.centrifuge.protocol.StreamPosition.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {centrifugal.centrifuge.protocol.IStreamPosition} message StreamPosition message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StreamPosition.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.offset);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.epoch);\n return writer;\n };\n\n /**\n * Encodes the specified StreamPosition message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.StreamPosition.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {centrifugal.centrifuge.protocol.IStreamPosition} message StreamPosition message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StreamPosition.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a StreamPosition message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.StreamPosition} StreamPosition\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StreamPosition.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.StreamPosition();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.offset = reader.uint64();\n break;\n }\n case 2: {\n message.epoch = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a StreamPosition message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.StreamPosition} StreamPosition\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StreamPosition.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a StreamPosition message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n StreamPosition.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for StreamPosition\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n StreamPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.StreamPosition\";\n };\n\n return StreamPosition;\n })();\n\n protocol.HistoryRequest = (function() {\n\n /**\n * Properties of a HistoryRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IHistoryRequest\n * @property {string|null} [channel] HistoryRequest channel\n * @property {number|null} [limit] HistoryRequest limit\n * @property {centrifugal.centrifuge.protocol.IStreamPosition|null} [since] HistoryRequest since\n * @property {boolean|null} [reverse] HistoryRequest reverse\n */\n\n /**\n * Constructs a new HistoryRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a HistoryRequest.\n * @implements IHistoryRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest=} [properties] Properties to set\n */\n function HistoryRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * HistoryRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.channel = \"\";\n\n /**\n * HistoryRequest limit.\n * @member {number} limit\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.limit = 0;\n\n /**\n * HistoryRequest since.\n * @member {centrifugal.centrifuge.protocol.IStreamPosition|null|undefined} since\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.since = null;\n\n /**\n * HistoryRequest reverse.\n * @member {boolean} reverse\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.reverse = false;\n\n /**\n * Encodes the specified HistoryRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest} message HistoryRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.limit != null && Object.hasOwnProperty.call(message, \"limit\"))\n writer.uint32(/* id 7, wireType 0 =*/56).int32(message.limit);\n if (message.since != null && Object.hasOwnProperty.call(message, \"since\"))\n $root.centrifugal.centrifuge.protocol.StreamPosition.encode(message.since, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.reverse != null && Object.hasOwnProperty.call(message, \"reverse\"))\n writer.uint32(/* id 9, wireType 0 =*/72).bool(message.reverse);\n return writer;\n };\n\n /**\n * Encodes the specified HistoryRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest} message HistoryRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HistoryRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.HistoryRequest} HistoryRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.HistoryRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 7: {\n message.limit = reader.int32();\n break;\n }\n case 8: {\n message.since = $root.centrifugal.centrifuge.protocol.StreamPosition.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.reverse = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a HistoryRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.HistoryRequest} HistoryRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a HistoryRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HistoryRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.limit != null && message.hasOwnProperty(\"limit\"))\n if (!$util.isInteger(message.limit))\n return \"limit: integer expected\";\n if (message.since != null && message.hasOwnProperty(\"since\")) {\n let error = $root.centrifugal.centrifuge.protocol.StreamPosition.verify(message.since);\n if (error)\n return \"since.\" + error;\n }\n if (message.reverse != null && message.hasOwnProperty(\"reverse\"))\n if (typeof message.reverse !== \"boolean\")\n return \"reverse: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for HistoryRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n HistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.HistoryRequest\";\n };\n\n return HistoryRequest;\n })();\n\n protocol.HistoryResult = (function() {\n\n /**\n * Properties of a HistoryResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IHistoryResult\n * @property {Array.<centrifugal.centrifuge.protocol.IPublication>|null} [publications] HistoryResult publications\n * @property {string|null} [epoch] HistoryResult epoch\n * @property {number|Long|null} [offset] HistoryResult offset\n */\n\n /**\n * Constructs a new HistoryResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a HistoryResult.\n * @implements IHistoryResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IHistoryResult=} [properties] Properties to set\n */\n function HistoryResult(properties) {\n this.publications = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * HistoryResult publications.\n * @member {Array.<centrifugal.centrifuge.protocol.IPublication>} publications\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.publications = $util.emptyArray;\n\n /**\n * HistoryResult epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.epoch = \"\";\n\n /**\n * HistoryResult offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Encodes the specified HistoryResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryResult} message HistoryResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.publications != null && message.publications.length)\n for (let i = 0; i < message.publications.length; ++i)\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.publications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.offset);\n return writer;\n };\n\n /**\n * Encodes the specified HistoryResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryResult} message HistoryResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HistoryResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.HistoryResult} HistoryResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.HistoryResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.publications && message.publications.length))\n message.publications = [];\n message.publications.push($root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.epoch = reader.string();\n break;\n }\n case 3: {\n message.offset = reader.uint64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a HistoryResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.HistoryResult} HistoryResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a HistoryResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HistoryResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.publications != null && message.hasOwnProperty(\"publications\")) {\n if (!Array.isArray(message.publications))\n return \"publications: array expected\";\n for (let i = 0; i < message.publications.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.publications[i]);\n if (error)\n return \"publications.\" + error;\n }\n }\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for HistoryResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n HistoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.HistoryResult\";\n };\n\n return HistoryResult;\n })();\n\n protocol.PingRequest = (function() {\n\n /**\n * Properties of a PingRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPingRequest\n */\n\n /**\n * Constructs a new PingRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PingRequest.\n * @implements IPingRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPingRequest=} [properties] Properties to set\n */\n function PingRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PingRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PingRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingRequest} message PingRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PingRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingRequest} message PingRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PingRequest} PingRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PingRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PingRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PingRequest} PingRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PingRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PingRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PingRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PingRequest\";\n };\n\n return PingRequest;\n })();\n\n protocol.PingResult = (function() {\n\n /**\n * Properties of a PingResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPingResult\n */\n\n /**\n * Constructs a new PingResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PingResult.\n * @implements IPingResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPingResult=} [properties] Properties to set\n */\n function PingResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PingResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PingResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingResult} message PingResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PingResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PingResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingResult} message PingResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PingResult} PingResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PingResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PingResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PingResult} PingResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PingResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PingResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PingResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PingResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PingResult\";\n };\n\n return PingResult;\n })();\n\n protocol.RPCRequest = (function() {\n\n /**\n * Properties of a RPCRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRPCRequest\n * @property {Uint8Array|null} [data] RPCRequest data\n * @property {string|null} [method] RPCRequest method\n */\n\n /**\n * Constructs a new RPCRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RPCRequest.\n * @implements IRPCRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRPCRequest=} [properties] Properties to set\n */\n function RPCRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RPCRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @instance\n */\n RPCRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * RPCRequest method.\n * @member {string} method\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @instance\n */\n RPCRequest.prototype.method = \"\";\n\n /**\n * Encodes the specified RPCRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCRequest} message RPCRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n if (message.method != null && Object.hasOwnProperty.call(message, \"method\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.method);\n return writer;\n };\n\n /**\n * Encodes the specified RPCRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCRequest} message RPCRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RPCRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RPCRequest} RPCRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RPCRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n case 2: {\n message.method = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RPCRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RPCRequest} RPCRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RPCRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RPCRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.method != null && message.hasOwnProperty(\"method\"))\n if (!$util.isString(message.method))\n return \"method: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RPCRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RPCRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RPCRequest\";\n };\n\n return RPCRequest;\n })();\n\n protocol.RPCResult = (function() {\n\n /**\n * Properties of a RPCResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRPCResult\n * @property {Uint8Array|null} [data] RPCResult data\n */\n\n /**\n * Constructs a new RPCResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RPCResult.\n * @implements IRPCResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRPCResult=} [properties] Properties to set\n */\n function RPCResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RPCResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @instance\n */\n RPCResult.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified RPCResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCResult} message RPCResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified RPCResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCResult} message RPCResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RPCResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RPCResult} RPCResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RPCResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RPCResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RPCResult} RPCResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RPCResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RPCResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RPCResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RPCResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RPCResult\";\n };\n\n return RPCResult;\n })();\n\n protocol.SendRequest = (function() {\n\n /**\n * Properties of a SendRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISendRequest\n * @property {Uint8Array|null} [data] SendRequest data\n */\n\n /**\n * Constructs a new SendRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SendRequest.\n * @implements ISendRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISendRequest=} [properties] Properties to set\n */\n function SendRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SendRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @instance\n */\n SendRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified SendRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SendRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISendRequest} message SendRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SendRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified SendRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SendRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISendRequest} message SendRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SendRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SendRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SendRequest} SendRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SendRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SendRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SendRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SendRequest} SendRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SendRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SendRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SendRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SendRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SendRequest\";\n };\n\n return SendRequest;\n })();\n\n return protocol;\n })();\n\n return centrifuge;\n })();\n\n return centrifugal;\n})();\n\nexport { $root as default };\n", "/**\n * This file is the entrypoint of browser builds.\n * The code executes when loaded in a browser.\n */\nimport { Centrifuge } from './centrifuge';\nimport { ProtobufCodec } from './protobuf.codec';\n\nexport default class CentrifugeProtobuf extends Centrifuge {\n protected _formatOverride() {\n this._codec = new ProtobufCodec();\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(globalThis as any).Centrifuge = CentrifugeProtobuf\n"],
|
|
5
|
-
"mappings": "2iBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAuBA,IAAIC,EAAI,OAAO,SAAY,SAAW,QAAU,KAC5CC,GAAeD,GAAK,OAAOA,EAAE,OAAU,WACvCA,EAAE,MACF,SAAsBE,EAAQC,EAAUC,EAAM,CAC9C,OAAO,SAAS,UAAU,MAAM,KAAKF,EAAQC,EAAUC,CAAI,CAC7D,EAEEC,EACAL,GAAK,OAAOA,EAAE,SAAY,WAC5BK,EAAiBL,EAAE,QACV,OAAO,sBAChBK,EAAiB,SAAwBH,EAAQ,CAC/C,OAAO,OAAO,oBAAoBA,CAAM,EACrC,OAAO,OAAO,sBAAsBA,CAAM,CAAC,CAChD,EAEAG,EAAiB,SAAwBH,EAAQ,CAC/C,OAAO,OAAO,oBAAoBA,CAAM,CAC1C,EAGF,SAASI,GAAmBC,EAAS,CAC/B,SAAW,QAAQ,MAAM,QAAQ,KAAKA,CAAO,CACnD,CAEA,IAAIC,GAAc,OAAO,OAAS,SAAqBC,EAAO,CAC5D,OAAOA,IAAUA,CACnB,EAEA,SAASC,GAAe,CACtBA,EAAa,KAAK,KAAK,IAAI,CAC7B,CACAX,GAAO,QAAUW,EACjBX,GAAO,QAAQ,KAAOY,GAGtBD,EAAa,aAAeA,EAE5BA,EAAa,UAAU,QAAU,OACjCA,EAAa,UAAU,aAAe,EACtCA,EAAa,UAAU,cAAgB,OAIvC,IAAIE,GAAsB,GAE1B,SAASC,GAAcC,EAAU,CAC/B,GAAI,OAAOA,GAAa,WACtB,MAAM,IAAI,UAAU,mEAAqE,OAAO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,KAAOC,EAAO,IAAMA,EAAO,KACzB,OAAAV,GAAM,gBAAgBU,CAAM,EACrB,CACL,GAAI,GACJ,IAAKA,EAAO,GACd,EAEF,MAAO,CACL,GAAI,EACN,CACF,CAEA,mBAAmBC,EAAmDC,EAA0E,CAC9I,IAAIC,EAAqBC,EACzB,GAAIH,EAAI,MAAO,CAEb,IAAMI,EAAaC,GAAWJ,EAAWD,EAAI,IAAK,EAClDE,EAAU,IAAI,WAAWE,CAAU,EACnCD,EAAeC,CACjB,MAEEF,EAAUF,EAAI,KACdG,EAAeH,EAAI,KAErB,MAAO,CAAE,QAAAE,EAAS,aAAAC,CAAa,CACjC,CACF,EE/EA,IAAqBG,GAArB,cAAgDC,CAAW,CAC7C,iBAAkB,CACxB,KAAK,OAAS,IAAIC,EACtB,CACJ,EAGC,WAAmB,WAAaF",
|
|
6
|
-
"names": ["require_events", "__commonJSMin", "exports", "module", "R", "ReflectApply", "target", "receiver", "args", "ReflectOwnKeys", "ProcessEmitWarning", "warning", "NumberIsNaN", "value", "EventEmitter", "once", "defaultMaxListeners", "checkListener", "listener", "arg", "n", "_getMaxListeners", "that", "type", "i", "doError", "events", "er", "err", "handler", "len", "listeners", "arrayClone", "_addListener", "prepend", "m", "existing", "w", "onceWrapper", "_onceWrap", "state", "wrapped", "list", "position", "originalListener", "spliceOne", "keys", "key", "_listeners", "unwrap", "evlistener", "unwrapListeners", "emitter", "listenerCount", "arr", "copy", "index", "ret", "name", "resolve", "reject", "errorListener", "resolver", "eventTargetAgnosticAddListener", "addErrorHandlerIfEventEmitter", "flags", "wrapListener", "require_aspromise", "__commonJSMin", "exports", "module", "asPromise", "fn", "ctx", "params", "offset", "index", "pending", "resolve", "reject", "err", "require_base64", "__commonJSMin", "exports", "base64", "string", "p", "b64", "s64", "i", "buffer", "start", "end", "parts", "chunk", "j", "t", "b", "invalidEncoding", "offset", "require_eventemitter", "__commonJSMin", "exports", "module", "EventEmitter", "evt", "fn", "ctx", "listeners", "i", "args", "require_float", "__commonJSMin", "exports", "module", "factory", "f32", "f8b", "le", "writeFloat_f32_cpy", "val", "buf", "pos", "writeFloat_f32_rev", "readFloat_f32_cpy", "readFloat_f32_rev", "writeFloat_ieee754", "writeUint", "sign", "exponent", "mantissa", "writeUintLE", "writeUintBE", "readFloat_ieee754", "readUint", "uint", "readUintLE", "readUintBE", "f64", "writeDouble_f64_cpy", "writeDouble_f64_rev", "readDouble_f64_cpy", "readDouble_f64_rev", "writeDouble_ieee754", "off0", "off1", "readDouble_ieee754", "lo", "hi", "require_inquire", "__commonJSMin", "e", "require_utf8", "__commonJSMin", "exports", "utf8", "string", "len", "c", "i", "buffer", "start", "end", "parts", "chunk", "t", "offset", "c1", "c2", "require_pool", "__commonJSMin", "exports", "module", "pool", "alloc", "slice", "size", "SIZE", "MAX", "slab", "offset", "buf", "require_longbits", "__commonJSMin", "exports", "module", "LongBits", "util", "lo", "hi", "zero", "zeroHash", "value", "sign", "unsigned", "charCodeAt", "hash", "mask", "part0", "part1", "part2", "require_minimal", "__commonJSMin", "exports", "util", "value", "obj", "prop", "Buffer", "sizeOrArray", "hash", "unsigned", "bits", "merge", "dst", "src", "ifNotSet", "keys", "i", "str", "newError", "name", "CustomError", "message", "properties", "fieldNames", "fieldMap", "encoding", "size", "require_writer", "__commonJSMin", "exports", "module", "Writer", "util", "BufferWriter", "LongBits", "base64", "utf8", "Op", "fn", "len", "val", "noop", "State", "writer", "create", "size", "writeByte", "buf", "pos", "writeVarint32", "VarintOp", "value", "writeVarint64", "bits", "writeFixed32", "writeBytes", "i", "head", "tail", "BufferWriter_", "require_writer_buffer", "__commonJSMin", "exports", "module", "BufferWriter", "Writer", "util", "val", "buf", "pos", "i", "value", "len", "writeStringBuffer", "require_reader", "__commonJSMin", "exports", "module", "Reader", "util", "BufferReader", "LongBits", "utf8", "indexOutOfRange", "reader", "writeLength", "buffer", "create_array", "create", "value", "readLongVarint", "bits", "i", "readFixed32_end", "buf", "end", "readFixed64", "length", "start", "nativeBuffer", "bytes", "wireType", "BufferReader_", "fn", "require_reader_buffer", "__commonJSMin", "exports", "module", "BufferReader", "Reader", "util", "buffer", "len", "require_service", "__commonJSMin", "exports", "module", "Service", "util", "rpcImpl", "requestDelimited", "responseDelimited", "rpcCall", "method", "requestCtor", "responseCtor", "request", "callback", "self", "err", "response", "endedByRPC", "require_rpc", "__commonJSMin", "exports", "rpc", "require_roots", "__commonJSMin", "exports", "module", "require_index_minimal", "__commonJSMin", "exports", "protobuf", "configure", "require_minimal", "__commonJSMin", "exports", "module", "import_events", "State", "SubscriptionState", "startsWith", "value", "prefix", "isFunction", "log", "level", "args", "logger", "randomInt", "min", "max", "backoff", "step", "interval", "errorExists", "data", "ttlMilliseconds", "ttl", "Subscription", "EventEmitter", "centrifuge", "channel", "options", "ctx", "timeout", "res", "rej", "data", "opts", "resolve", "reject", "timeoutDuration", "newState", "oldState", "result", "pubs", "i", "ttlMilliseconds", "code", "reason", "token", "e", "error", "UnauthorizedError", "cmd", "resolveCtx", "rejectCtx", "req", "offset", "epoch", "args", "sendUnsubscribe", "promise", "pub", "newData", "newPrevValue", "join", "info", "leave", "id", "err", "self", "delay", "errContext", "backoff", "getToken", "msg", "SockjsTransport", "endpoint", "options", "_protocol", "callbacks", "e", "closeEvent", "event", "data", "WebsocketTransport", "endpoint", "options", "protocol", "callbacks", "subProtocol", "
|
|
4
|
+
"sourcesContent": ["// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n", "\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.<string,*>}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n", "\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor<Buffer>}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor<Uint8Array>}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor<Long>}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.<string,*>} dst Destination object\n * @param {Object.<string,*>} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.<string,*>} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor<Error>} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message<T>\n * @constructor\n * @param {string} message Error message\n * @param {Object.<string,*>} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message<T>}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n", "\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n", "\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n", "\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n", "\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n", "\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n * @type {function}\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method\n * @param {Constructor<TReq>} requestCtor Request constructor\n * @param {Constructor<TRes>} responseCtor Response constructor\n * @param {TReq|Properties<TReq>} request Request message or plain object\n * @param {rpc.ServiceMethodCallback<TRes>} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message<TReq>\n * @template TRes extends Message<TRes>\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n", "\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n", "\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.<string,Root>}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n", "\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n", "// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n", "import EventEmitter from 'events';\nimport { Centrifuge, UnauthorizedError } from './centrifuge';\nimport { errorCodes, unsubscribedCodes, subscribingCodes, connectingCodes } from './codes';\nimport {\n HistoryOptions, HistoryResult, PresenceResult, PresenceStatsResult,\n PublishResult, State, SubscriptionEvents, SubscriptionOptions,\n SubscriptionState, SubscriptionTokenContext, TypedEventEmitter,\n SubscriptionDataContext\n} from './types';\nimport { ttlMilliseconds, backoff } from './utils';\n\n/** Subscription to a channel */\nexport class Subscription extends (EventEmitter as new () => TypedEventEmitter<SubscriptionEvents>) {\n channel: string;\n state: SubscriptionState;\n\n private _centrifuge: Centrifuge;\n private _promises: Record<number, any>;\n private _resubscribeTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _refreshTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _getToken: null | ((ctx: SubscriptionTokenContext) => Promise<string>);\n private _minResubscribeDelay: number;\n private _maxResubscribeDelay: number;\n private _recover: boolean;\n private _offset: number | null;\n private _epoch: string | null;\n private _resubscribeAttempts: number;\n private _promiseId: number;\n private _delta: string;\n private _delta_negotiated: boolean;\n private _token: string;\n private _data: any | null;\n private _getData: null | ((ctx: SubscriptionDataContext) => Promise<any>);\n private _recoverable: boolean;\n private _positioned: boolean;\n private _joinLeave: boolean;\n private _filter: string;\n // @ts-ignore \u2013 this is used by a client in centrifuge.ts.\n private _inflight: boolean;\n private _prevValue: any;\n private _unsubPromise: any;\n\n /** Subscription constructor should not be used directly, create subscriptions using Client method. */\n constructor(centrifuge: Centrifuge, channel: string, options?: Partial<SubscriptionOptions>) {\n super();\n this.channel = channel;\n this.state = SubscriptionState.Unsubscribed;\n this._centrifuge = centrifuge;\n this._token = '';\n this._getToken = null;\n this._data = null;\n this._getData = null;\n this._recover = false;\n this._offset = null;\n this._epoch = null;\n this._recoverable = false;\n this._positioned = false;\n this._joinLeave = false;\n this._filter = '';\n this._minResubscribeDelay = 500;\n this._maxResubscribeDelay = 20000;\n this._resubscribeTimeout = null;\n this._resubscribeAttempts = 0;\n this._promises = {};\n this._promiseId = 0;\n this._inflight = false;\n this._refreshTimeout = null;\n this._delta = '';\n this._delta_negotiated = false;\n this._prevValue = null;\n this._unsubPromise = Promise.resolve();\n this._setOptions(options);\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n if (this._centrifuge._debugEnabled) {\n this.on('state', (ctx) => {\n this._debug('subscription state', channel, ctx.oldState, '->', ctx.newState);\n });\n this.on('error', (ctx) => {\n this._debug('subscription error', channel, ctx);\n });\n } else {\n // Avoid unhandled exception in EventEmitter for non-set error handler.\n this.on('error', function () { Function.prototype(); });\n }\n }\n\n /** ready returns a Promise which resolves upon subscription goes to Subscribed \n * state and rejects in case of subscription goes to Unsubscribed state. \n * Optional timeout can be passed.*/\n ready(timeout?: number): Promise<void> {\n if (this.state === SubscriptionState.Unsubscribed) {\n return Promise.reject({ code: errorCodes.subscriptionUnsubscribed, message: this.state });\n }\n if (this.state === SubscriptionState.Subscribed) {\n return Promise.resolve();\n }\n return new Promise((res, rej) => {\n const ctx: any = {\n resolve: res,\n reject: rej\n };\n if (timeout) {\n ctx.timeout = setTimeout(function () {\n rej({ code: errorCodes.timeout, message: 'timeout' });\n }, timeout);\n }\n this._promises[this._nextPromiseId()] = ctx;\n });\n }\n\n /** subscribe to a channel.*/\n subscribe() {\n if (this._isSubscribed()) {\n return;\n }\n this._resubscribeAttempts = 0;\n this._setSubscribing(subscribingCodes.subscribeCalled, 'subscribe called');\n }\n\n /** unsubscribe from a channel, keeping position state.*/\n unsubscribe() {\n this._unsubPromise = this._setUnsubscribed(unsubscribedCodes.unsubscribeCalled, 'unsubscribe called', true);\n }\n\n /** publish data to a channel.*/\n async publish(data: any): Promise<PublishResult> {\n await this._methodCall();\n return this._centrifuge.publish(this.channel, data);\n }\n\n /** get online presence for a channel.*/\n async presence(): Promise<PresenceResult> {\n await this._methodCall();\n return this._centrifuge.presence(this.channel);\n }\n\n /** presence stats for a channel (num clients and unique users).*/\n async presenceStats(): Promise<PresenceStatsResult> {\n await this._methodCall();\n return this._centrifuge.presenceStats(this.channel);\n }\n\n /** history for a channel. By default it does not return publications (only current\n * StreamPosition data) \u2013 provide an explicit limit > 0 to load publications.*/\n async history(opts: HistoryOptions): Promise<HistoryResult> {\n await this._methodCall();\n return this._centrifuge.history(this.channel, opts);\n }\n\n private _methodCall(): Promise<void> {\n if (this._isSubscribed()) {\n return Promise.resolve();\n }\n\n if (this._isUnsubscribed()) {\n return Promise.reject({\n code: errorCodes.subscriptionUnsubscribed,\n message: this.state\n });\n }\n\n return new Promise((resolve, reject) => {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n const timeoutDuration = this._centrifuge._config.timeout;\n\n const timeout = setTimeout(() => {\n reject({ code: errorCodes.timeout, message: 'timeout' });\n }, timeoutDuration);\n\n this._promises[this._nextPromiseId()] = {\n timeout,\n resolve,\n reject\n };\n });\n }\n\n private _nextPromiseId() {\n return ++this._promiseId;\n }\n\n private _needRecover() {\n return this._recover === true;\n }\n\n private _isUnsubscribed() {\n return this.state === SubscriptionState.Unsubscribed;\n }\n\n private _isSubscribing() {\n return this.state === SubscriptionState.Subscribing;\n }\n\n private _isSubscribed() {\n return this.state === SubscriptionState.Subscribed;\n }\n\n private _setState(newState: SubscriptionState) {\n if (this.state !== newState) {\n const oldState = this.state;\n this.state = newState;\n this.emit('state', { newState, oldState, channel: this.channel });\n return true;\n }\n return false;\n }\n\n private _usesToken(): boolean {\n return this._token !== '' || this._getToken !== null;\n }\n\n private _clearSubscribingState() {\n this._resubscribeAttempts = 0;\n this._clearResubscribeTimeout();\n }\n\n private _clearSubscribedState() {\n this._clearRefreshTimeout();\n }\n\n private _setSubscribed(result: any) {\n if (!this._isSubscribing()) {\n return;\n }\n this._clearSubscribingState();\n\n if (result.recoverable) {\n this._recover = true;\n this._offset = result.offset || 0;\n this._epoch = result.epoch || '';\n }\n if (result.delta) {\n this._delta_negotiated = true;\n } else {\n this._delta_negotiated = false;\n }\n\n this._setState(SubscriptionState.Subscribed);\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const ctx = this._centrifuge._getSubscribeContext(this.channel, result);\n this.emit('subscribed', ctx);\n this._resolvePromises();\n\n const pubs = result.publications;\n if (pubs && pubs.length > 0) {\n for (const i in pubs) {\n if (!pubs.hasOwnProperty(i)) {\n continue;\n }\n this._handlePublication(pubs[i]);\n }\n }\n\n if (result.expires === true) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private async _setSubscribing(code: number, reason: string) {\n if (this._isSubscribing()) {\n return;\n }\n if (this._isSubscribed()) {\n this._clearSubscribedState();\n }\n if (this._setState(SubscriptionState.Subscribing)) {\n this.emit('subscribing', { channel: this.channel, code: code, reason: reason });\n }\n // @ts-ignore \u2013 for performance reasons only await _unsubPromise for emulution case where it's required.\n if (this._centrifuge._transport && this._centrifuge._transport.emulation()) {\n await this._unsubPromise;\n }\n if (!this._isSubscribing()) {\n return;\n }\n this._subscribe();\n }\n\n private _subscribe(): any {\n this._debug('subscribing on', this.channel);\n\n if (!this._isTransportOpen()) {\n this._debug('delay subscribe on', this.channel, 'till connected');\n return null;\n }\n\n if (this._inflight) {\n return null;\n }\n this._inflight = true;\n\n if (this._canSubscribeWithoutGettingToken()) {\n return this._subscribeWithoutToken();\n }\n\n this._getSubscriptionToken()\n .then(token => this._handleTokenResponse(token))\n .catch(e => this._handleTokenError(e));\n\n return null;\n }\n\n private _isTransportOpen(): boolean {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n return this._centrifuge._transportIsOpen;\n }\n\n private _canSubscribeWithoutGettingToken(): boolean {\n return !this._usesToken() || !!this._token;\n }\n\n private _subscribeWithoutToken(): any {\n if (this._getData) {\n this._getDataAndSubscribe(this._token);\n return null;\n } else {\n return this._sendSubscribe(this._token);\n }\n }\n\n private _getDataAndSubscribe(token: string): void {\n if (!this._getData) {\n this._inflight = false;\n return;\n }\n\n this._getData({ channel: this.channel })\n .then(data => {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n this._data = data;\n this._sendSubscribe(token);\n })\n .catch(e => this._handleGetDataError(e));\n }\n\n private _handleGetDataError(error: any): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (error instanceof UnauthorizedError) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this.emit('error', {\n type: 'subscribeData',\n channel: this.channel,\n error: {\n code: errorCodes.badConfiguration,\n message: error?.toString() || ''\n }\n });\n\n this._inflight = false;\n this._scheduleResubscribe();\n }\n\n private _handleTokenResponse(token: string | null): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (!token) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this._token = token;\n\n if (this._getData) {\n this._getDataAndSubscribe(token);\n } else {\n this._sendSubscribe(token);\n }\n }\n\n private _handleTokenError(error: any): void {\n if (!this._isSubscribing()) {\n this._inflight = false;\n return;\n }\n\n if (error instanceof UnauthorizedError) {\n this._inflight = false;\n this._failUnauthorized();\n return;\n }\n\n this.emit('error', {\n type: 'subscribeToken',\n channel: this.channel,\n error: {\n code: errorCodes.subscriptionSubscribeToken,\n message: error?.toString() || ''\n }\n });\n\n this._inflight = false;\n this._scheduleResubscribe();\n }\n\n private _sendSubscribe(token: string): any {\n if (!this._isTransportOpen()) {\n this._inflight = false;\n return null;\n }\n\n const cmd = this._buildSubscribeCommand(token);\n\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._call(cmd).then(resolveCtx => {\n this._inflight = false;\n const result = resolveCtx.reply.subscribe;\n this._handleSubscribeResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n this._inflight = false;\n this._handleSubscribeError(rejectCtx.error);\n\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n\n return cmd;\n }\n\n private _buildSubscribeCommand(token: string): any {\n const req: any = { channel: this.channel };\n\n if (token) req.token = token;\n if (this._data) req.data = this._data;\n if (this._positioned) req.positioned = true;\n if (this._recoverable) req.recoverable = true;\n if (this._joinLeave) req.join_leave = true;\n\n if (this._needRecover()) {\n req.recover = true;\n const offset = this._getOffset();\n if (offset) req.offset = offset;\n const epoch = this._getEpoch();\n if (epoch) req.epoch = epoch;\n }\n\n if (this._delta) req.delta = this._delta;\n if (this._filter) req.filter = this._filter;\n\n return { subscribe: req };\n }\n\n private _debug(...args: any[]): void {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._debug(...args);\n }\n\n private _handleSubscribeError(error) {\n if (!this._isSubscribing()) {\n return;\n }\n if (error.code === errorCodes.timeout) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n this._centrifuge._disconnect(connectingCodes.subscribeTimeout, 'subscribe timeout', true);\n return;\n }\n this._subscribeError(error);\n }\n\n private _handleSubscribeResponse(result) {\n if (!this._isSubscribing()) {\n return;\n }\n this._setSubscribed(result);\n }\n\n private _setUnsubscribed(code, reason, sendUnsubscribe): Promise<void> {\n if (this._isUnsubscribed()) {\n return Promise.resolve();\n }\n let promise = Promise.resolve();\n if (this._isSubscribed()) {\n if (sendUnsubscribe) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n promise = this._centrifuge._unsubscribe(this);\n }\n this._clearSubscribedState();\n } else if (this._isSubscribing()) {\n if (this._inflight && sendUnsubscribe) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n promise = this._centrifuge._unsubscribe(this);\n }\n this._clearSubscribingState();\n }\n this._inflight = false;\n if (this._setState(SubscriptionState.Unsubscribed)) {\n this.emit('unsubscribed', { channel: this.channel, code: code, reason: reason });\n }\n this._rejectPromises({ code: errorCodes.subscriptionUnsubscribed, message: this.state });\n return promise;\n }\n\n private _handlePublication(pub: any) {\n if (this._delta && this._delta_negotiated) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const { newData, newPrevValue } = this._centrifuge._codec.applyDeltaIfNeeded(pub, this._prevValue)\n pub.data = newData;\n this._prevValue = newPrevValue;\n }\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const ctx = this._centrifuge._getPublicationContext(this.channel, pub);\n this.emit('publication', ctx);\n if (pub.offset) {\n this._offset = pub.offset;\n }\n }\n\n protected _handleJoin(join: any) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const info = this._centrifuge._getJoinLeaveContext(join.info)\n this.emit('join', { channel: this.channel, info: info });\n }\n\n protected _handleLeave(leave: any) {\n // @ts-ignore \u2013 we are hiding some methods from public API autocompletion.\n const info = this._centrifuge._getJoinLeaveContext(leave.info)\n this.emit('leave', { channel: this.channel, info: info });\n }\n\n private _resolvePromises() {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].resolve();\n delete this._promises[id];\n }\n }\n\n private _rejectPromises(err: any) {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].reject(err);\n delete this._promises[id];\n }\n }\n\n private _scheduleResubscribe() {\n if (!this._isSubscribing()) {\n this._debug('not in subscribing state, skip resubscribe scheduling', this.channel);\n return;\n }\n const self = this;\n const delay = this._getResubscribeDelay();\n this._resubscribeTimeout = setTimeout(function () {\n if (self._isSubscribing()) {\n self._subscribe();\n }\n }, delay);\n this._debug('resubscribe scheduled after ' + delay, this.channel);\n }\n\n private _subscribeError(err: any) {\n if (!this._isSubscribing()) {\n return;\n }\n if (err.code < 100 || err.code === 109 || err.temporary === true) {\n if (err.code === 109) { // Token expired error.\n this._token = '';\n }\n const errContext = {\n channel: this.channel,\n type: 'subscribe',\n error: err\n };\n if (this._centrifuge.state === State.Connected) {\n this.emit('error', errContext);\n }\n this._scheduleResubscribe();\n } else {\n this._setUnsubscribed(err.code, err.message, false);\n }\n }\n\n private _getResubscribeDelay() {\n const delay = backoff(this._resubscribeAttempts, this._minResubscribeDelay, this._maxResubscribeDelay);\n this._resubscribeAttempts++;\n return delay;\n }\n\n private _setOptions(options: Partial<SubscriptionOptions> | undefined) {\n if (!options) {\n return;\n }\n if (options.since) {\n this._offset = options.since.offset || 0;\n this._epoch = options.since.epoch || '';\n this._recover = true;\n }\n if (options.data) {\n this._data = options.data;\n }\n if (options.getData) {\n this._getData = options.getData;\n }\n if (options.minResubscribeDelay !== undefined) {\n this._minResubscribeDelay = options.minResubscribeDelay;\n }\n if (options.maxResubscribeDelay !== undefined) {\n this._maxResubscribeDelay = options.maxResubscribeDelay;\n }\n if (options.token) {\n this._token = options.token;\n }\n if (options.getToken) {\n this._getToken = options.getToken;\n }\n if (options.positioned === true) {\n this._positioned = true;\n }\n if (options.recoverable === true) {\n this._recoverable = true;\n }\n if (options.joinLeave === true) {\n this._joinLeave = true;\n }\n if (options.delta) {\n if (options.delta !== 'fossil') {\n throw new Error('unsupported delta format');\n }\n this._delta = options.delta;\n }\n if (options.filter) {\n this._filter = options.filter;\n }\n }\n\n private _getOffset() {\n const offset = this._offset;\n if (offset !== null) {\n return offset;\n }\n return 0;\n }\n\n private _getEpoch() {\n const epoch = this._epoch;\n if (epoch !== null) {\n return epoch;\n }\n return '';\n }\n\n private _clearRefreshTimeout() {\n if (this._refreshTimeout !== null) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n }\n\n private _clearResubscribeTimeout() {\n if (this._resubscribeTimeout !== null) {\n clearTimeout(this._resubscribeTimeout);\n this._resubscribeTimeout = null;\n }\n }\n\n private _getSubscriptionToken() {\n this._debug('get subscription token for channel', this.channel);\n const ctx = {\n channel: this.channel\n };\n const getToken = this._getToken;\n if (getToken === null) {\n this.emit('error', {\n type: 'configuration',\n channel: this.channel,\n error: {\n code: errorCodes.badConfiguration,\n message: 'provide a function to get channel subscription token'\n }\n });\n return Promise.reject(new UnauthorizedError(''));\n }\n return getToken(ctx);\n }\n\n private _refresh() {\n this._clearRefreshTimeout();\n const self = this;\n this._getSubscriptionToken().then(function (token) {\n if (!self._isSubscribed()) {\n return;\n }\n if (!token) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n const req = {\n channel: self.channel,\n token: token\n };\n const msg = {\n 'sub_refresh': req\n };\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n self._centrifuge._call(msg).then(resolveCtx => {\n const result = resolveCtx.reply.sub_refresh;\n self._refreshResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._refreshError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n }).catch(function (e) {\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n type: 'refreshToken',\n channel: self.channel,\n error: {\n code: errorCodes.subscriptionRefreshToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n self._refreshTimeout = setTimeout(() => self._refresh(), self._getRefreshRetryDelay());\n });\n }\n\n private _refreshResponse(result: any) {\n if (!this._isSubscribed()) {\n return;\n }\n this._debug('subscription token refreshed, channel', this.channel);\n this._clearRefreshTimeout();\n if (result.expires === true) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private _refreshError(err: any) {\n if (!this._isSubscribed()) {\n return;\n }\n if (err.code < 100 || err.temporary === true) {\n this.emit('error', {\n type: 'refresh',\n channel: this.channel,\n error: err\n });\n this._refreshTimeout = setTimeout(() => this._refresh(), this._getRefreshRetryDelay());\n } else {\n this._setUnsubscribed(err.code, err.message, true);\n }\n }\n\n private _getRefreshRetryDelay() {\n return backoff(0, 10000, 20000);\n }\n\n private _failUnauthorized() {\n this._setUnsubscribed(unsubscribedCodes.unauthorized, 'unauthorized', true);\n }\n}", "/** EventMap */\nexport type EventMap = {\n [key: string]: (...args: any[]) => void\n}\n\n/** Typed event emitter. */\nexport interface TypedEventEmitter<Events extends EventMap> {\n addListener<E extends keyof Events>(event: E, listener: Events[E]): this\n on<E extends keyof Events>(event: E, listener: Events[E]): this\n once<E extends keyof Events>(event: E, listener: Events[E]): this\n prependListener<E extends keyof Events>(event: E, listener: Events[E]): this\n prependOnceListener<E extends keyof Events>(event: E, listener: Events[E]): this\n off<E extends keyof Events>(event: E, listener: Events[E]): this\n removeAllListeners<E extends keyof Events>(event?: E): this\n removeListener<E extends keyof Events>(event: E, listener: Events[E]): this\n emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): boolean\n rawListeners<E extends keyof Events>(event: E): Events[E][]\n listeners<E extends keyof Events>(event: E): Events[E][]\n}\n\n/** Client events which can be emitted. */\nexport type ClientEvents = {\n /** called when client state changes */\n state: (ctx: StateContext) => void;\n /** called when client goes to connecting state */\n connecting: (ctx: ConnectingContext) => void;\n /** called when client goes to connected state */\n connected: (ctx: ConnectedContext) => void;\n /** called when client goes to disconnected state */\n disconnected: (ctx: DisconnectedContext) => void;\n\n // Async message coming from a server.\n message: (ctx: MessageContext) => void;\n // Listen to errors happening internally. \n error: (ctx: ErrorContext) => void;\n\n // Listen for server-side subscription events.\n subscribed: (ctx: ServerSubscribedContext) => void;\n subscribing: (ctx: ServerSubscribingContext) => void;\n unsubscribed: (ctx: ServerUnsubscribedContext) => void;\n publication: (ctx: ServerPublicationContext) => void;\n join: (ctx: ServerJoinContext) => void;\n leave: (ctx: ServerLeaveContext) => void;\n}\n\n/** State of client. */\nexport enum State {\n Disconnected = \"disconnected\",\n Connecting = \"connecting\",\n Connected = \"connected\"\n}\n\n/** Events of Subscription. */\nexport type SubscriptionEvents = {\n /** called when subscription state changes */\n state: (ctx: SubscriptionStateContext) => void;\n /** called when subscription state goes to subscribing */\n subscribing: (ctx: SubscribingContext) => void;\n /** called when subscription state goes to subscribed */\n subscribed: (ctx: SubscribedContext) => void;\n /** called when subscription state goes to unsubscribed */\n unsubscribed: (ctx: UnsubscribedContext) => void;\n\n /** called when publication from channel received */\n publication: (ctx: PublicationContext) => void;\n /** called when join event from channel received */\n join: (ctx: JoinContext) => void;\n /** called when leave event from channel received */\n leave: (ctx: LeaveContext) => void;\n\n /** listen to subscription errors happening internally */\n error: (ctx: SubscriptionErrorContext) => void;\n}\n\n/** State of Subscription */\nexport enum SubscriptionState {\n Unsubscribed = \"unsubscribed\",\n Subscribing = \"subscribing\",\n Subscribed = \"subscribed\"\n}\n\nexport type TransportName = 'websocket' | 'http_stream' | 'sse' | 'sockjs' | 'webtransport';\n\n/** TransportEndpoint allows configuring transport when using fallback mode */\nexport interface TransportEndpoint {\n /** transport to use */\n transport: TransportName;\n /** endpoint for a selected transport type */\n endpoint: string;\n}\n\n/** Options for Centrifuge client. */\nexport interface Options {\n // provide header emulation, these headers are sent with first protocol message\n // the backend can process those in a customized manner. In case of Centrifugo\n // these headers are then used like real HTTP headers sent from the client.\n // Requires Centrifugo v6.\n headers: {[key: string]: string};\n // HTTP headers to send with WebSocket handshake request.\n // Only works in Node.js environment with 'ws' library.\n // Browser WebSocket API does not support custom headers.\n httpHeaders: {[key: string]: string};\n /** allows enabling debug mode */\n debug: boolean;\n /** allows setting initial connection token (JWT) */\n token: string;\n /** allows setting function to get/refresh connection token */\n getToken: null | ((ctx: ConnectionTokenContext) => Promise<string>);\n /** data to send to a server with connect command */\n data: any | null;\n /** allows setting function to get/renew connection data */\n getData: null | (() => Promise<any>);\n /** name of client - it's not a unique name of each connection, it's sth to identify\n * from where client connected */\n name: string;\n /** version of client */\n version: string;\n /** minimum delay between reconnect attempts in milliseconds */\n minReconnectDelay: number;\n /** maximum delay between reconnect attempts in milliseconds */\n maxReconnectDelay: number;\n /** timeout for operations in milliseconds */\n timeout: number;\n /** maximum delay of server pings to detect broken connection in milliseconds */\n maxServerPingDelay: number;\n /** provide custom WebSocket constructor, useful for NodeJS env where WebSocket is not\n * available globally */\n websocket: any | null;\n /** provide shim for fetch implementation */\n fetch: any | null;\n /** provide shim for ReadableStream */\n readableStream: any | null;\n /** provide shim for EventSource object */\n eventsource: any | null;\n /** provide shim for SockJS object */\n sockjs: any | null;\n /** allows modifying options passed to SockJS constructor */\n sockjsOptions: SockjsOptions;\n /** which emulation endpoint to use */\n emulationEndpoint: string;\n /** EventTarget for network online/offline events, in browser environment \n * Centrifuge uses global window online/offline events automatically\n * by default. */\n networkEventTarget: EventTarget | null;\n}\n\nexport interface SockjsOptions {\n transports?: string[];\n timeout?: number;\n}\n\nexport interface StateContext {\n newState: State;\n oldState: State;\n}\n\nexport interface ConnectedContext {\n client: string;\n transport: string;\n data?: any;\n}\n\nexport interface ErrorContext {\n type: string;\n error: Error;\n transport?: string;\n}\n\nexport interface Error {\n code: number;\n message: string;\n}\n\nexport interface ConnectingContext {\n code: number;\n reason: string;\n}\n\nexport interface DisconnectedContext {\n code: number;\n reason: string;\n}\n\nexport interface MessageContext {\n data: any;\n}\n\nexport interface PublicationContext {\n // channel from which publication was received.\n channel: string;\n // data contains publication payload.\n data: any;\n // info is an optional ClientInfo object. It's appended to publication only if publication was\n // sent using client SDK's publish method. If publication was sent over server publish API\n // this info object is missing as we don't have publisher client context in that case.\n info?: ClientInfo;\n // offset may be set for channels where history Centrifugo feature is on. In this case it's an\n // incremental number assigned to publication by server broker (upon adding to history stream). \n offset?: number;\n // tags is an extra key-value attached to publication, tags may be set when calling server publish API. \n tags?: Record<string, string>;\n}\n\nexport interface ClientInfo {\n // client is a globally unique identifier which server allocates for every connection.\n client: string;\n // user contains ID of authenticated user. Empty user means anonymous user. One user can have\n // many client connections.\n user: string;\n // connInfo is optional information attached to connection (during connection authentication).\n connInfo?: any;\n // chanInfo is optional information attached to subscription (during subscription authorization).\n chanInfo?: any;\n}\n\nexport interface JoinContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface LeaveContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface SubscriptionStateContext {\n channel: string;\n newState: SubscriptionState;\n oldState: SubscriptionState;\n}\n\nexport interface ServerSubscribedContext {\n /** channel of Subscription. */\n channel: string;\n /** subscription is recoverable \u2013 i.e. can automatically recover missed messages */\n recoverable: boolean;\n /** subscription is positioned \u2013 i.e. server tracks message loss on the way from PUB/SUB broker */\n positioned: boolean;\n /** streamPosition set when Subscription is recoverable or positioned. */\n streamPosition?: StreamPosition;\n /** wasRecovering is true when recovery was used in subscribe request. */\n wasRecovering: boolean;\n /** whether or not missed publications may be successfully recovered. */\n recovered: boolean;\n /** whether or not successfully recovered subscription has received missed publications.\n Warning: must be used for metrics/logs purposes only.\n Recovered publications are processed after 'subscribed' event. **/\n hasRecoveredPublications: boolean;\n /** custom data for Subscription returned from server. */\n data?: any;\n}\n\nexport interface SubscribedContext {\n /** channel of Subscription. */\n channel: string;\n /** subscription is recoverable \u2013 i.e. can automatically recover missed messages */\n recoverable: boolean;\n /** subscription is positioned \u2013 i.e. server tracks message loss on the way from PUB/SUB broker */\n positioned: boolean;\n /** streamPosition is set when Subscription is recoverable or positioned. */\n streamPosition?: StreamPosition;\n /** wasRecovering is true when recovery was used in subscribe request. */\n wasRecovering: boolean;\n /** whether or not missed publications may be successfully recovered. */\n recovered: boolean;\n /** whether or not successfully recovered subscription has received missed publications.\n Warning: must be used for metrics/logs purposes only.\n Recovered publications are processed after 'subscribed' event. **/\n hasRecoveredPublications: boolean;\n /** custom data for Subscription returned from server. */\n data?: any;\n}\n\nexport interface SubscriptionErrorContext {\n channel: string;\n type: string;\n error: Error;\n}\n\nexport interface UnsubscribedContext {\n channel: string;\n code: number;\n reason: string;\n}\n\nexport interface ServerPublicationContext {\n // channel from which publication was received.\n channel: string;\n // data contains publication payload.\n data: any;\n // info is an optional ClientInfo object. It's appended to publication only if publication was\n // sent using client SDK's publish method. If publication was sent over server publish API\n // this info object is missing as we don't have publisher client context in that case.\n info?: ClientInfo;\n // offset may be set for channels where history Centrifugo feature is on. In this case it's an\n // incremental number assigned to publication by server broker (upon adding to history stream). \n offset?: number;\n // tags is an extra key-value attached to publication, tags may be set when calling server publish API. \n tags?: Record<string, string>;\n}\n\nexport interface ServerJoinContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface ServerLeaveContext {\n channel: string;\n info: ClientInfo;\n}\n\nexport interface ServerUnsubscribedContext {\n channel: string;\n}\n\nexport interface SubscribingContext {\n channel: string;\n code: number;\n reason: string;\n}\n\nexport interface ServerSubscribingContext {\n channel: string;\n}\n\nexport interface ConnectionTokenContext {\n}\n\nexport interface SubscriptionTokenContext {\n channel: string;\n}\n\nexport interface SubscriptionDataContext {\n channel: string;\n}\n\nexport interface PublishResult {\n}\n\nexport interface RpcResult {\n data: any;\n}\n\nexport interface PresenceResult {\n clients: Record<string, ClientInfo>;\n}\n\nexport interface PresenceStatsResult {\n numClients: number;\n numUsers: number;\n}\n\nexport interface HistoryResult {\n publications: PublicationContext[];\n offset: number;\n epoch: string;\n}\n\nexport interface HistoryOptions {\n limit?: number;\n since?: StreamPosition;\n reverse?: boolean;\n}\n\n/** SubscriptionOptions can customize Subscription. */\nexport interface SubscriptionOptions {\n /** allows setting initial subscription token (JWT) */\n token: string;\n /** allows setting function to get/refresh subscription token */\n getToken: null | ((ctx: SubscriptionTokenContext) => Promise<string>);\n /** data to send to a server with subscribe command */\n data: any | null;\n /** allows setting function to get/renew subscription data */\n getData: null | ((ctx: SubscriptionDataContext) => Promise<any>);\n /** force recovery on first subscribe from a provided StreamPosition. */\n since: Partial<StreamPosition> | null;\n /** min delay between resubscribe attempts. */\n minResubscribeDelay: number;\n /** max delay between resubscribe attempts. */\n maxResubscribeDelay: number;\n /** ask server to make subscription positioned. */\n positioned: boolean;\n /** ask server to make subscription recoverable. */\n recoverable: boolean;\n /** ask server to send join/leave messages. */\n joinLeave: boolean;\n /** delta format to be used */\n delta: 'fossil';\n /** filter expression for subscription */\n filter: string;\n}\n\n/** Stream postion describes position of publication inside a stream. */\nexport interface StreamPosition {\n offset: number;\n epoch: string;\n}\n", "/** @internal */\nexport function startsWith(value, prefix) {\n return value.lastIndexOf(prefix, 0) === 0;\n}\n\n/** @internal */\nexport function isFunction(value) {\n if (value === undefined || value === null) {\n return false;\n }\n return typeof value === 'function';\n}\n\n/** @internal */\nexport function log(level: string, args) {\n if (globalThis.console) {\n const logger = globalThis.console[level];\n\n if (isFunction(logger)) {\n logger.apply(globalThis.console, args);\n }\n }\n}\n\nfunction randomInt(min: number, max: number) { // min and max included\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\n/** @internal */\nexport function backoff(step: number, min: number, max: number) {\n // Full jitter technique, see:\n // https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/\n if (step > 31) { step = 31; }\n const interval = randomInt(0, Math.min(max, min * Math.pow(2, step)));\n return Math.min(max, min + interval);\n}\n\n/** @internal */\nexport function errorExists(data: any) {\n return 'error' in data && data.error !== null;\n}\n\n/** @internal */\nexport function ttlMilliseconds(ttl: number) {\n // https://stackoverflow.com/questions/12633405/what-is-the-maximum-delay-for-setinterval\n return Math.min(ttl * 1000, 2147483647);\n}\n", "/** @internal */\nexport class SockjsTransport {\n endpoint: string;\n options: any;\n _transport: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n }\n\n name() {\n return 'sockjs';\n }\n\n subName() {\n return 'sockjs-' + this._transport.transport;\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.sockjs !== null;\n }\n\n initialize(_protocol: 'json', callbacks: any) {\n this._transport = new this.options.sockjs(this.endpoint, null, this.options.sockjsOptions);\n\n this._transport.onopen = () => {\n callbacks.onOpen();\n };\n\n this._transport.onerror = e => {\n callbacks.onError(e);\n };\n\n this._transport.onclose = closeEvent => {\n callbacks.onClose(closeEvent);\n };\n\n this._transport.onmessage = event => {\n callbacks.onMessage(event.data);\n };\n }\n\n close() {\n this._transport.close();\n }\n\n send(data: any) {\n this._transport.send(data);\n }\n}\n", "/** @internal */\nexport class WebsocketTransport {\n private _transport: any;\n private endpoint: string;\n private options: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n }\n\n name() {\n return 'websocket';\n }\n\n subName() {\n return 'websocket';\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.websocket !== undefined && this.options.websocket !== null;\n }\n\n initialize(protocol: string, callbacks: any) {\n let subProtocol = '';\n if (protocol === 'protobuf') {\n subProtocol = 'centrifuge-protobuf';\n }\n\n // Check if we have HTTP headers to pass (only works in Node.js with 'ws' library)\n // Browser WebSocket API does not support custom headers\n const httpHeaders = this.options.httpHeaders;\n const hasHttpHeaders = httpHeaders && Object.keys(httpHeaders).length > 0;\n\n if (subProtocol !== '') {\n if (hasHttpHeaders) {\n // Node.js 'ws' library supports third argument with headers\n this._transport = new this.options.websocket(this.endpoint, subProtocol, { headers: httpHeaders });\n } else {\n this._transport = new this.options.websocket(this.endpoint, subProtocol);\n }\n } else {\n if (hasHttpHeaders) {\n // Node.js 'ws' library supports third argument with headers\n this._transport = new this.options.websocket(this.endpoint, undefined, { headers: httpHeaders });\n } else {\n this._transport = new this.options.websocket(this.endpoint);\n }\n }\n if (protocol === 'protobuf') {\n this._transport.binaryType = 'arraybuffer';\n }\n\n this._transport.onopen = () => {\n callbacks.onOpen();\n };\n\n this._transport.onerror = e => {\n callbacks.onError(e);\n };\n\n this._transport.onclose = closeEvent => {\n callbacks.onClose(closeEvent);\n };\n\n this._transport.onmessage = event => {\n callbacks.onMessage(event.data);\n };\n }\n\n close() {\n this._transport.close();\n }\n\n send(data: any) {\n this._transport.send(data);\n }\n}\n", "/** @internal */\nexport class HttpStreamTransport {\n endpoint: string;\n options: any;\n _abortController: any | null;\n _utf8decoder: TextDecoder;\n _protocol: string;\n\n constructor(endpoint, options) {\n this.endpoint = endpoint;\n this.options = options;\n this._abortController = null;\n this._utf8decoder = new TextDecoder();\n this._protocol = 'json';\n }\n\n name() {\n return 'http_stream';\n }\n\n subName() {\n return 'http_stream';\n }\n\n emulation() {\n return true;\n }\n\n _handleErrors(response: any) {\n if (!response.ok) throw new Error(response.status);\n return response;\n }\n\n _fetchEventTarget(self, endpoint: string, options: object) {\n const eventTarget = new EventTarget();\n // fetch with connection timeout maybe? https://github.com/github/fetch/issues/175\n const fetchFunc = self.options.fetch;\n fetchFunc(endpoint, options)\n .then(self._handleErrors)\n .then(response => {\n eventTarget.dispatchEvent(new Event('open'));\n let jsonStreamBuf = '';\n let jsonStreamPos = 0;\n let protoStreamBuf = new Uint8Array();\n const reader = response.body.getReader();\n return new self.options.readableStream({\n start(controller) {\n function pump() {\n return reader.read().then(({ done, value }) => {\n // When no more data needs to be consumed, close the stream\n if (done) {\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n }\n try {\n if (self._protocol === 'json') {\n jsonStreamBuf += self._utf8decoder.decode(value);\n while (jsonStreamPos < jsonStreamBuf.length) {\n if (jsonStreamBuf[jsonStreamPos] === '\\n') {\n const line = jsonStreamBuf.substring(0, jsonStreamPos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: line }));\n jsonStreamBuf = jsonStreamBuf.substring(jsonStreamPos + 1);\n jsonStreamPos = 0;\n } else {\n ++jsonStreamPos;\n }\n }\n } else {\n const mergedArray = new Uint8Array(protoStreamBuf.length + value.length);\n mergedArray.set(protoStreamBuf);\n mergedArray.set(value, protoStreamBuf.length);\n protoStreamBuf = mergedArray;\n\n while (true) {\n const result = self.options.decoder.decodeReply(protoStreamBuf);\n if (result.ok) {\n const data = protoStreamBuf.slice(0, result.pos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: data }));\n protoStreamBuf = protoStreamBuf.slice(result.pos);\n continue;\n }\n break;\n }\n }\n } catch (error) {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: error }));\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n }\n pump();\n }).catch(function (e) {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: e }));\n eventTarget.dispatchEvent(new Event('close'));\n controller.close();\n return;\n });\n }\n return pump();\n }\n });\n })\n .catch(error => {\n // @ts-ignore - improve later.\n eventTarget.dispatchEvent(new Event('error', { detail: error }));\n eventTarget.dispatchEvent(new Event('close'));\n });\n return eventTarget;\n }\n\n supported() {\n return this.options.fetch !== null &&\n this.options.readableStream !== null &&\n typeof TextDecoder !== 'undefined' &&\n typeof AbortController !== 'undefined' &&\n typeof EventTarget !== 'undefined' &&\n typeof Event !== 'undefined' &&\n typeof MessageEvent !== 'undefined' &&\n typeof Error !== 'undefined';\n }\n\n initialize(protocol: string, callbacks: any, initialData: any) {\n this._protocol = protocol;\n this._abortController = new AbortController();\n let headers: any;\n let body: any;\n if (protocol === 'json') {\n headers = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n body = initialData;\n } else {\n headers = {\n 'Accept': 'application/octet-stream',\n 'Content-Type': 'application/octet-stream'\n };\n body = initialData;\n }\n\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n signal: this._abortController.signal\n }\n\n const eventTarget = this._fetchEventTarget(\n this,\n this.endpoint,\n fetchOptions\n );\n\n eventTarget.addEventListener('open', () => {\n callbacks.onOpen();\n });\n\n eventTarget.addEventListener('error', (e) => {\n this._abortController.abort();\n callbacks.onError(e);\n });\n\n eventTarget.addEventListener('close', () => {\n this._abortController.abort();\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n\n eventTarget.addEventListener('message', (e: any) => {\n callbacks.onMessage(e.data);\n });\n }\n\n close() {\n this._abortController.abort();\n }\n\n send(data: any, session: string, node: string) {\n let headers: any;\n let body: any;\n const req = {\n session: session,\n node: node,\n data: data\n };\n if (this._protocol === 'json') {\n headers = {\n 'Content-Type': 'application/json'\n };\n body = JSON.stringify(req);\n } else {\n headers = {\n 'Content-Type': 'application/octet-stream'\n };\n body = this.options.encoder.encodeEmulationRequest(req);\n }\n\n const fetchFunc = this.options.fetch;\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n }\n fetchFunc(this.options.emulationEndpoint, fetchOptions);\n }\n}\n", "/** @internal */\nexport class SseTransport {\n endpoint: string;\n options: any;\n _protocol: string;\n _transport: any;\n _onClose: any;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._protocol = 'json';\n this._transport = null;\n this._onClose = null;\n }\n\n name() {\n return 'sse';\n }\n\n subName() {\n return 'sse';\n }\n\n emulation() {\n return true;\n }\n\n supported() {\n return this.options.eventsource !== null && this.options.fetch !== null;\n }\n\n initialize(_protocol: 'json', callbacks: any, initialData: any) {\n let url: any;\n if (globalThis && globalThis.document && globalThis.document.baseURI) {\n // Handle case when endpoint is relative, like //example.com/connection/sse\n url = new URL(this.endpoint, globalThis.document.baseURI);\n } else {\n url = new URL(this.endpoint);\n }\n url.searchParams.append('cf_connect', initialData);\n\n const eventsourceOptions = {}\n const eventSource = new this.options.eventsource(url.toString(), eventsourceOptions);\n this._transport = eventSource;\n\n const self = this;\n\n eventSource.onopen = function () {\n callbacks.onOpen();\n };\n\n eventSource.onerror = function (e) {\n eventSource.close();\n callbacks.onError(e);\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n };\n\n eventSource.onmessage = function (e) {\n callbacks.onMessage(e.data);\n };\n\n self._onClose = function () {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n };\n }\n\n close() {\n this._transport.close();\n if (this._onClose !== null) {\n this._onClose();\n }\n }\n\n send(data: any, session: string, node: string) {\n const req = {\n session: session,\n node: node,\n data: data\n };\n const headers = {\n 'Content-Type': 'application/json'\n };\n const body = JSON.stringify(req);\n const fetchFunc = this.options.fetch;\n const fetchOptions = {\n method: 'POST',\n headers: headers,\n body: body,\n mode: 'cors',\n credentials: 'same-origin',\n }\n fetchFunc(this.options.emulationEndpoint, fetchOptions);\n }\n}\n", "/** @internal */\nexport class WebtransportTransport {\n private _transport: any;\n private _stream: any;\n private _writer: any;\n private endpoint: string;\n private options: any;\n _utf8decoder: TextDecoder;\n _protocol: string;\n\n constructor(endpoint: string, options: any) {\n this.endpoint = endpoint;\n this.options = options;\n this._transport = null;\n this._stream = null;\n this._writer = null;\n this._utf8decoder = new TextDecoder();\n this._protocol = 'json';\n }\n\n name() {\n return 'webtransport';\n }\n\n subName() {\n return 'webtransport';\n }\n\n emulation() {\n return false;\n }\n\n supported() {\n return this.options.webtransport !== undefined && this.options.webtransport !== null;\n }\n\n async initialize(protocol: string, callbacks: any) {\n let url: any;\n if (globalThis && globalThis.document && globalThis.document.baseURI) {\n // Handle case when endpoint is relative, like //example.com/connection/webtransport\n url = new URL(this.endpoint, globalThis.document.baseURI);\n } else {\n url = new URL(this.endpoint);\n }\n if (protocol === 'protobuf') {\n url.searchParams.append('cf_protocol', 'protobuf');\n }\n\n this._protocol = protocol;\n const eventTarget = new EventTarget();\n\n this._transport = new this.options.webtransport(url.toString());\n this._transport.closed.then(() => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n }).catch(() => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n try {\n await this._transport.ready;\n } catch {\n this.close();\n return;\n }\n let stream: any;\n try {\n stream = await this._transport.createBidirectionalStream();\n } catch {\n this.close();\n return;\n }\n this._stream = stream;\n this._writer = this._stream.writable.getWriter();\n\n eventTarget.addEventListener('close', () => {\n callbacks.onClose({\n code: 4,\n reason: 'connection closed'\n });\n });\n\n eventTarget.addEventListener('message', (e: any) => {\n callbacks.onMessage(e.data);\n });\n\n this._startReading(eventTarget);\n\n callbacks.onOpen();\n }\n\n async _startReading(eventTarget: any) {\n const reader = this._stream.readable.getReader();\n let jsonStreamBuf = '';\n let jsonStreamPos = 0;\n let protoStreamBuf = new Uint8Array();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (value.length > 0) {\n if (this._protocol === 'json') {\n jsonStreamBuf += this._utf8decoder.decode(value);\n while (jsonStreamPos < jsonStreamBuf.length) {\n if (jsonStreamBuf[jsonStreamPos] === '\\n') {\n const line = jsonStreamBuf.substring(0, jsonStreamPos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: line }));\n jsonStreamBuf = jsonStreamBuf.substring(jsonStreamPos + 1);\n jsonStreamPos = 0;\n } else {\n ++jsonStreamPos;\n }\n }\n } else {\n const mergedArray = new Uint8Array(protoStreamBuf.length + value.length);\n mergedArray.set(protoStreamBuf);\n mergedArray.set(value, protoStreamBuf.length);\n protoStreamBuf = mergedArray;\n\n while (true) {\n const result = this.options.decoder.decodeReply(protoStreamBuf);\n if (result.ok) {\n const data = protoStreamBuf.slice(0, result.pos);\n eventTarget.dispatchEvent(new MessageEvent('message', { data: data }));\n protoStreamBuf = protoStreamBuf.slice(result.pos);\n continue;\n }\n break;\n }\n }\n }\n if (done) {\n break;\n }\n }\n } catch {\n eventTarget.dispatchEvent(new Event('close'));\n }\n }\n\n async close() {\n try {\n if (this._writer) {\n await this._writer.close();\n }\n this._transport.close();\n } catch (e) {\n // already closed.\n }\n }\n\n async send(data: any) {\n let binary: Uint8Array;\n if (this._protocol === 'json') {\n // Need extra \\n since WT is non-frame protocol. \n binary = new TextEncoder().encode(data + '\\n');\n } else {\n binary = data;\n }\n try {\n await this._writer.write(binary);\n } catch (e) {\n this.close();\n }\n }\n}\n", "/*\nCopyright 2014-2024 Dmitry Chestnykh (JavaScript port)\nCopyright 2007 D. Richard Hipp (original C version)\n\nFossil SCM delta compression algorithm, this is only the applyDelta part extracted\nfrom https://github.com/dchest/fossil-delta-js. The code was slightly modified\nto strip unnecessary parts. The copyright on top of this file is from the original\nrepo on Github licensed under Simplified BSD License.\n*/\n\n// We accept plain arrays of bytes or Uint8Array.\ntype ByteArray = number[] | Uint8Array;\n\n\nconst zValue = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1,\n -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,\n 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, 36, -1, 37,\n 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,\n 57, 58, 59, 60, 61, 62, -1, -1, -1, 63, -1,\n];\n\n// Reader reads bytes, chars, ints from array.\nclass Reader {\n public a: ByteArray;\n public pos: number;\n\n constructor(array: ByteArray) {\n this.a = array; // source array\n this.pos = 0; // current position in array\n }\n\n haveBytes() {\n return this.pos < this.a.length;\n }\n\n getByte() {\n const b = this.a[this.pos];\n this.pos++;\n if (this.pos > this.a.length) throw new RangeError(\"out of bounds\");\n return b;\n }\n\n getChar() {\n return String.fromCharCode(this.getByte());\n }\n\n // Read base64-encoded unsigned integer.\n getInt() {\n let v = 0;\n let c: number;\n while (this.haveBytes() && (c = zValue[0x7f & this.getByte()]) >= 0) {\n v = (v << 6) + c;\n }\n this.pos--;\n return v >>> 0;\n }\n}\n\n// Write writes an array.\nclass Writer {\n private a: number[] = [];\n\n toByteArray<T extends ByteArray>(sourceType: T): T {\n if (Array.isArray(sourceType)) {\n return this.a as T;\n }\n return new Uint8Array(this.a) as T;\n }\n\n // Copy from array at start to end.\n putArray(a: ByteArray, start: number, end: number) {\n // TODO: optimize.\n for (let i = start; i < end; i++) this.a.push(a[i]);\n }\n}\n\n// Return a 32-bit checksum of the array.\nfunction checksum(arr: ByteArray): number {\n let sum0 = 0,\n sum1 = 0,\n sum2 = 0,\n sum3 = 0,\n z = 0,\n N = arr.length;\n //TODO measure if this unrolling is helpful.\n while (N >= 16) {\n sum0 = (sum0 + arr[z + 0]) | 0;\n sum1 = (sum1 + arr[z + 1]) | 0;\n sum2 = (sum2 + arr[z + 2]) | 0;\n sum3 = (sum3 + arr[z + 3]) | 0;\n\n sum0 = (sum0 + arr[z + 4]) | 0;\n sum1 = (sum1 + arr[z + 5]) | 0;\n sum2 = (sum2 + arr[z + 6]) | 0;\n sum3 = (sum3 + arr[z + 7]) | 0;\n\n sum0 = (sum0 + arr[z + 8]) | 0;\n sum1 = (sum1 + arr[z + 9]) | 0;\n sum2 = (sum2 + arr[z + 10]) | 0;\n sum3 = (sum3 + arr[z + 11]) | 0;\n\n sum0 = (sum0 + arr[z + 12]) | 0;\n sum1 = (sum1 + arr[z + 13]) | 0;\n sum2 = (sum2 + arr[z + 14]) | 0;\n sum3 = (sum3 + arr[z + 15]) | 0;\n\n z += 16;\n N -= 16;\n }\n while (N >= 4) {\n sum0 = (sum0 + arr[z + 0]) | 0;\n sum1 = (sum1 + arr[z + 1]) | 0;\n sum2 = (sum2 + arr[z + 2]) | 0;\n sum3 = (sum3 + arr[z + 3]) | 0;\n z += 4;\n N -= 4;\n }\n sum3 = (((((sum3 + (sum2 << 8)) | 0) + (sum1 << 16)) | 0) + (sum0 << 24)) | 0;\n switch (N) {\n //@ts-ignore fallthrough is needed.\n case 3:\n sum3 = (sum3 + (arr[z + 2] << 8)) | 0; /* falls through */\n //@ts-ignore fallthrough is needed.\n case 2:\n sum3 = (sum3 + (arr[z + 1] << 16)) | 0; /* falls through */\n case 1:\n sum3 = (sum3 + (arr[z + 0] << 24)) | 0; /* falls through */\n }\n return sum3 >>> 0;\n}\n\n/**\n * Apply a delta byte array to a source byte array, returning the target byte array.\n */\nexport function applyDelta<T extends ByteArray>(\n source: T,\n delta: T\n): T {\n let total = 0;\n const zDelta = new Reader(delta);\n const lenSrc = source.length;\n const lenDelta = delta.length;\n\n const limit = zDelta.getInt();\n if (zDelta.getChar() !== \"\\n\")\n throw new Error(\"size integer not terminated by '\\\\n'\");\n const zOut = new Writer();\n while (zDelta.haveBytes()) {\n const cnt = zDelta.getInt();\n let ofst: number;\n\n switch (zDelta.getChar()) {\n case \"@\":\n ofst = zDelta.getInt();\n if (zDelta.haveBytes() && zDelta.getChar() !== \",\")\n throw new Error(\"copy command not terminated by ','\");\n total += cnt;\n if (total > limit) throw new Error(\"copy exceeds output file size\");\n if (ofst + cnt > lenSrc)\n throw new Error(\"copy extends past end of input\");\n zOut.putArray(source, ofst, ofst + cnt);\n break;\n\n case \":\":\n total += cnt;\n if (total > limit)\n throw new Error(\n \"insert command gives an output larger than predicted\"\n );\n if (cnt > lenDelta)\n throw new Error(\"insert count exceeds size of delta\");\n zOut.putArray(zDelta.a, zDelta.pos, zDelta.pos + cnt);\n zDelta.pos += cnt;\n break;\n\n case \";\":\n {\n const out = zOut.toByteArray(source);\n if (cnt !== checksum(out))\n throw new Error(\"bad checksum\");\n if (total !== limit)\n throw new Error(\"generated size does not match predicted size\");\n return out;\n }\n default:\n throw new Error(\"unknown delta operator\");\n }\n }\n throw new Error(\"unterminated delta\");\n}\n", "import { applyDelta } from './fossil';\n\n/** @internal */\nexport class JsonCodec {\n name() {\n return 'json';\n }\n\n encodeCommands(commands: any[]): string {\n return commands.map(c => JSON.stringify(c)).join('\\n');\n }\n\n decodeReplies(data: string): any[] {\n return data.trim().split('\\n').map(r => JSON.parse(r));\n }\n\n applyDeltaIfNeeded(pub: any, prevValue: any) {\n let newData: any, newPrevValue: any;\n if (pub.delta) {\n // JSON string delta.\n const valueArray = applyDelta(prevValue, new TextEncoder().encode(pub.data));\n newData = JSON.parse(new TextDecoder().decode(valueArray))\n newPrevValue = valueArray;\n } else {\n // Full data as JSON string.\n newData = JSON.parse(pub.data);\n newPrevValue = new TextEncoder().encode(pub.data);\n }\n return { newData, newPrevValue }\n }\n}\n", "import { Subscription } from './subscription';\nimport {\n errorCodes, disconnectedCodes,\n connectingCodes, subscribingCodes\n} from './codes';\n\nimport { SockjsTransport } from './transport_sockjs';\nimport { WebsocketTransport } from './transport_websocket';\nimport { HttpStreamTransport } from './transport_http_stream';\nimport { SseTransport } from './transport_sse';\nimport { WebtransportTransport } from './transport_webtransport';\n\nimport { JsonCodec } from './json';\n\nimport {\n isFunction, log, startsWith, errorExists,\n backoff, ttlMilliseconds\n} from './utils';\n\nimport {\n State, Options, SubscriptionState, ClientEvents,\n TypedEventEmitter, RpcResult, SubscriptionOptions,\n HistoryOptions, HistoryResult, PublishResult,\n PresenceResult, PresenceStatsResult, SubscribedContext,\n TransportEndpoint,\n} from './types';\n\nimport EventEmitter from 'events';\n\nconst defaults: Options = {\n headers: {},\n httpHeaders: {},\n token: '',\n getToken: null,\n data: null,\n getData: null,\n debug: false,\n name: 'js',\n version: '',\n fetch: null,\n readableStream: null,\n websocket: null,\n eventsource: null,\n sockjs: null,\n sockjsOptions: {},\n emulationEndpoint: '/emulation',\n minReconnectDelay: 500,\n maxReconnectDelay: 20000,\n timeout: 5000,\n maxServerPingDelay: 10000,\n networkEventTarget: null,\n}\n\ninterface serverSubscription {\n offset: number;\n epoch: string;\n recoverable: boolean;\n}\n\ntype CallResolveContext = { reply: any; next?: () => void };\ntype CallRejectContext = { error: any; next?: () => void };\n\nexport class UnauthorizedError extends Error {\n constructor(message: any) {\n super(message);\n this.name = this.constructor.name;\n }\n}\n\n/** Centrifuge is a Centrifuge/Centrifugo bidirectional client. */\nexport class Centrifuge extends (EventEmitter as new () => TypedEventEmitter<ClientEvents>) {\n state: State;\n private _transportIsOpen: boolean;\n private _endpoint: string | Array<TransportEndpoint>;\n private _emulation: boolean;\n private _transports: any[];\n private _currentTransportIndex: number;\n private _triedAllTransports: boolean;\n private _transportWasOpen: boolean;\n private _transport?: any;\n private _transportId: number;\n private _deviceWentOffline: boolean;\n private _transportClosed: boolean;\n private _reconnecting: boolean;\n private _reconnectTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _reconnectAttempts: number;\n private _client: null;\n private _session: string;\n private _node: string;\n private _subs: Record<string, Subscription>;\n private _serverSubs: Record<string, serverSubscription>;\n private _commandId: number;\n private _commands: any[];\n private _batching: boolean;\n private _refreshRequired: boolean;\n private _refreshTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _callbacks: Record<number, any>;\n private _token: string;\n private _data: any;\n private _dispatchPromise: Promise<void>;\n private _serverPing: number;\n private _serverPingTimeout?: null | ReturnType<typeof setTimeout> = null;\n private _sendPong: boolean;\n private _promises: Record<number, any>;\n private _promiseId: number;\n private _networkEventsSet: boolean;\n\n private _debugEnabled: boolean;\n private _config: Options;\n protected _codec: any;\n\n static SubscriptionState: typeof SubscriptionState;\n static State: typeof State;\n static UnauthorizedError: typeof UnauthorizedError;\n\n /** Constructs Centrifuge client. Call connect() method to start connecting. */\n constructor(endpoint: string | Array<TransportEndpoint>, options?: Partial<Options>) {\n super();\n this.state = State.Disconnected;\n this._transportIsOpen = false;\n this._endpoint = endpoint;\n this._emulation = false;\n this._transports = [];\n this._currentTransportIndex = 0;\n this._triedAllTransports = false;\n this._transportWasOpen = false;\n this._transport = null;\n this._transportId = 0;\n this._deviceWentOffline = false;\n this._transportClosed = true;\n this._codec = new JsonCodec();\n this._reconnecting = false;\n this._reconnectTimeout = null;\n this._reconnectAttempts = 0;\n this._client = null;\n this._session = '';\n this._node = '';\n this._subs = {};\n this._serverSubs = {};\n this._commandId = 0;\n this._commands = [];\n this._batching = false;\n this._refreshRequired = false;\n this._refreshTimeout = null;\n this._callbacks = {};\n this._token = '';\n this._data = null;\n this._dispatchPromise = Promise.resolve();\n this._serverPing = 0;\n this._serverPingTimeout = null;\n this._sendPong = false;\n this._promises = {};\n this._promiseId = 0;\n this._debugEnabled = false;\n this._networkEventsSet = false;\n\n this._config = { ...defaults, ...options };\n this._configure();\n\n if (this._debugEnabled) {\n this.on('state', (ctx) => {\n this._debug('client state', ctx.oldState, '->', ctx.newState);\n });\n this.on('error', (ctx) => {\n this._debug('client error', ctx);\n });\n } else {\n // Avoid unhandled exception in EventEmitter for non-set error handler.\n this.on('error', function () { Function.prototype(); });\n }\n }\n\n /** newSubscription allocates new Subscription to a channel. Since server only allows \n * one subscription per channel per client this method throws if client already has \n * channel subscription in internal registry.\n * */\n newSubscription(channel: string, options?: Partial<SubscriptionOptions>): Subscription {\n if (this.getSubscription(channel) !== null) {\n throw new Error('Subscription to the channel ' + channel + ' already exists');\n }\n const sub = new Subscription(this, channel, options);\n this._subs[channel] = sub;\n return sub;\n }\n\n /** getSubscription returns Subscription if it's registered in the internal \n * registry or null. */\n getSubscription(channel: string): Subscription | null {\n return this._getSub(channel);\n }\n\n /** removeSubscription allows removing Subcription from the internal registry. */\n removeSubscription(sub: Subscription | null) {\n if (!sub) {\n return;\n }\n if (sub.state !== SubscriptionState.Unsubscribed) {\n sub.unsubscribe();\n }\n this._removeSubscription(sub);\n }\n\n /** Get a map with all current client-side subscriptions. */\n subscriptions(): Record<string, Subscription> {\n return this._subs;\n }\n\n /** ready returns a Promise which resolves upon client goes to Connected \n * state and rejects in case of client goes to Disconnected or Failed state.\n * Users can provide optional timeout in milliseconds. */\n ready(timeout?: number): Promise<void> {\n switch (this.state) {\n case State.Disconnected:\n return Promise.reject({ code: errorCodes.clientDisconnected, message: 'client disconnected' });\n\n case State.Connected:\n return Promise.resolve();\n\n default:\n return new Promise((resolve, reject) => {\n const ctx: any = { resolve, reject };\n\n if (timeout) {\n ctx.timeout = setTimeout(() => {\n reject({ code: errorCodes.timeout, message: 'timeout' });\n }, timeout);\n }\n\n this._promises[this._nextPromiseId()] = ctx;\n });\n }\n }\n\n /** connect to a server. */\n connect() {\n if (this._isConnected()) {\n this._debug('connect called when already connected');\n return;\n }\n if (this._isConnecting()) {\n this._debug('connect called when already connecting');\n return;\n }\n this._debug('connect called');\n this._reconnectAttempts = 0;\n this._startConnecting();\n }\n\n /** disconnect from a server. */\n disconnect() {\n this._disconnect(disconnectedCodes.disconnectCalled, 'disconnect called', false);\n }\n\n /** setToken allows setting connection token. Or resetting used token to be empty. */\n setToken(token: string) {\n this._token = token;\n }\n\n /** setHeaders allows setting connection emulated headers. */\n setHeaders(headers: { [key: string]: string }) {\n this._config.headers = headers;\n }\n\n /** setHttpHeaders allows setting HTTP headers for WebSocket handshake.\n * Only works in Node.js environment with 'ws' library.\n * Browser WebSocket API does not support custom headers. */\n setHttpHeaders(headers: { [key: string]: string }) {\n this._config.httpHeaders = headers;\n }\n\n /** setWebsocket allows setting WebSocket implementation at runtime.\n * Useful for lazy-loading 'ws' library in Node.js environment.\n * Must be called before connect(). */\n setWebsocket(websocket: any) {\n this._config.websocket = websocket;\n }\n\n /** send asynchronous data to a server (without any response from a server \n * expected, see rpc method if you need response). */\n async send(data: any): Promise<void> {\n const cmd = {\n send: {\n data\n }\n };\n\n await this._methodCall();\n\n const sent = this._transportSendCommands([cmd]); // can send message to server without id set\n\n if (!sent) {\n throw this._createErrorObject(\n errorCodes.transportWriteError,\n 'transport write error'\n );\n }\n }\n\n /** rpc to a server - i.e. a call which waits for a response with data. */\n async rpc(method: string, data: any): Promise<RpcResult> {\n const cmd = {\n rpc: {\n method,\n data\n }\n };\n\n await this._methodCall();\n const result = await this._callPromise(cmd, (reply: any) => reply.rpc);\n return {\n data: result.data\n };\n }\n\n /** publish data to a channel. */\n async publish(channel: string, data: any): Promise<PublishResult> {\n const cmd = {\n publish: {\n channel,\n data\n }\n };\n\n await this._methodCall();\n await this._callPromise(cmd, () => ({}));\n return {};\n }\n\n /** history for a channel. By default it does not return publications (only current\n * StreamPosition data) \u2013 provide an explicit limit > 0 to load publications.*/\n async history(channel: string, options?: HistoryOptions): Promise<HistoryResult> {\n const cmd = {\n history: this._getHistoryRequest(channel, options)\n };\n\n await this._methodCall();\n\n const result = await this._callPromise(cmd, (reply: any) => reply.history);\n\n const publications: any[] = [];\n\n if (result.publications) {\n for (let i = 0; i < result.publications.length; i++) {\n publications.push(this._getPublicationContext(channel, result.publications[i]));\n }\n }\n\n return {\n publications,\n epoch: result.epoch || '',\n offset: result.offset || 0\n };\n }\n\n /** presence for a channel. */\n async presence(channel: string): Promise<PresenceResult> {\n const cmd = {\n presence: {\n channel\n }\n };\n\n await this._methodCall();\n const result = await this._callPromise(cmd, (reply: any) => reply.presence);\n\n const clients = result.presence;\n\n for (const clientId in clients) {\n if (Object.prototype.hasOwnProperty.call(clients, clientId)) {\n const rawClient = clients[clientId];\n const connInfo = rawClient['conn_info'];\n const chanInfo = rawClient['chan_info'];\n if (connInfo) {\n rawClient.connInfo = connInfo;\n }\n if (chanInfo) {\n rawClient.chanInfo = chanInfo;\n }\n }\n }\n\n return { clients };\n }\n\n async presenceStats(channel: string): Promise<PresenceStatsResult> {\n const cmd: any = {\n 'presence_stats': {\n channel\n }\n };\n\n await this._methodCall();\n\n const result = await this._callPromise(cmd, (reply: any) => {\n return reply.presence_stats;\n });\n\n return {\n numUsers: result.num_users,\n numClients: result.num_clients\n };\n }\n\n /** start command batching (collect into temporary buffer without sending to a server) \n * until stopBatching called.*/\n startBatching() {\n // start collecting messages without sending them to Centrifuge until flush\n // method called\n this._batching = true;\n }\n\n /** stop batching commands and flush collected commands to the \n * network (all in one request/frame).*/\n stopBatching() {\n const self = this;\n // Why so nested? Two levels here requred to deal with promise resolving queue.\n // In Subscription case we wait 2 futures before sending data to connection.\n // Otherwise _batching becomes false before batching decision has a chance to be executed.\n Promise.resolve().then(function () {\n Promise.resolve().then(function () {\n self._batching = false;\n self._flush();\n })\n })\n }\n\n private _debug(...args: any[]) {\n if (!this._debugEnabled) {\n return;\n }\n log('debug', args);\n }\n\n private _codecName(): string {\n return this._codec.name()\n }\n\n /** @internal */\n protected _formatOverride() {\n return;\n }\n\n private _configure() {\n if (!('Promise' in globalThis)) {\n throw new Error('Promise polyfill required');\n }\n\n if (!this._endpoint) {\n throw new Error('endpoint configuration required');\n }\n\n if (this._config.token !== null) {\n this._token = this._config.token;\n }\n\n if (this._config.data !== null) {\n this._data = this._config.data;\n }\n\n this._codec = new JsonCodec();\n this._formatOverride();\n\n if (this._config.debug === true ||\n (typeof localStorage !== 'undefined' && localStorage.getItem('centrifuge.debug'))) {\n this._debugEnabled = true;\n }\n\n this._debug('config', this._config);\n\n if (typeof this._endpoint === 'string') {\n // Single address.\n } else if (typeof this._endpoint === 'object' && this._endpoint instanceof Array) {\n this._transports = this._endpoint;\n this._emulation = true;\n for (const i in this._transports) {\n if (this._transports.hasOwnProperty(i)) {\n const transportConfig = this._transports[i];\n if (!transportConfig.endpoint || !transportConfig.transport) {\n throw new Error('malformed transport configuration');\n }\n const transportName = transportConfig.transport;\n if (['websocket', 'http_stream', 'sse', 'sockjs', 'webtransport'].indexOf(transportName) < 0) {\n throw new Error('unsupported transport name: ' + transportName);\n }\n }\n }\n } else {\n throw new Error('unsupported url configuration type: only string or array of objects are supported');\n }\n }\n\n private _setState(newState: State) {\n if (this.state !== newState) {\n this._reconnecting = false;\n const oldState = this.state;\n this.state = newState;\n this.emit('state', { newState, oldState });\n return true;\n }\n return false;\n }\n\n private _isDisconnected() {\n return this.state === State.Disconnected;\n }\n\n private _isConnecting() {\n return this.state === State.Connecting;\n }\n\n private _isConnected() {\n return this.state === State.Connected;\n }\n\n private _nextCommandId() {\n return ++this._commandId;\n }\n\n private _setNetworkEvents() {\n if (this._networkEventsSet) {\n return;\n }\n let eventTarget: EventTarget | null = null;\n if (this._config.networkEventTarget !== null) {\n eventTarget = this._config.networkEventTarget;\n } else if (typeof globalThis.addEventListener !== 'undefined') {\n eventTarget = globalThis as EventTarget;\n }\n if (eventTarget) {\n eventTarget.addEventListener('offline', () => {\n this._debug('offline event triggered');\n if (this.state === State.Connected || this.state === State.Connecting) {\n this._disconnect(connectingCodes.transportClosed, 'transport closed', true);\n this._deviceWentOffline = true;\n }\n });\n eventTarget.addEventListener('online', () => {\n this._debug('online event triggered');\n if (this.state !== State.Connecting) {\n return;\n }\n if (this._deviceWentOffline && !this._transportClosed) {\n // This is a workaround for mobile Safari where close callback may be\n // not issued upon device going to the flight mode. We know for sure\n // that transport close was called, so we start reconnecting. In this\n // case if the close callback will be issued for some reason after some\n // time \u2013 it will be ignored due to transport ID mismatch.\n this._deviceWentOffline = false;\n this._transportClosed = true;\n }\n this._clearReconnectTimeout();\n this._startReconnecting();\n });\n this._networkEventsSet = true;\n }\n }\n\n private _getReconnectDelay() {\n const delay = backoff(this._reconnectAttempts, this._config.minReconnectDelay, this._config.maxReconnectDelay);\n this._reconnectAttempts += 1;\n return delay;\n }\n\n private _clearOutgoingRequests() {\n // fire errbacks of registered outgoing calls.\n for (const id in this._callbacks) {\n if (this._callbacks.hasOwnProperty(id)) {\n const callbacks = this._callbacks[id];\n clearTimeout(callbacks.timeout);\n const errback = callbacks.errback;\n if (!errback) {\n continue;\n }\n errback({ error: this._createErrorObject(errorCodes.connectionClosed, 'connection closed') });\n }\n }\n this._callbacks = {};\n }\n\n private _clearConnectedState() {\n this._client = null;\n this._clearServerPingTimeout();\n this._clearRefreshTimeout();\n\n // fire events for client-side subscriptions.\n for (const channel in this._subs) {\n if (!this._subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = this._subs[channel];\n if (sub.state === SubscriptionState.Subscribed) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setSubscribing(subscribingCodes.transportClosed, 'transport closed');\n }\n }\n\n // fire events for server-side subscriptions.\n for (const channel in this._serverSubs) {\n if (this._serverSubs.hasOwnProperty(channel)) {\n this.emit('subscribing', { channel: channel });\n }\n }\n }\n\n private _handleWriteError(commands: any[]) {\n for (const command of commands) {\n const id = command.id;\n if (!(id in this._callbacks)) {\n continue;\n }\n const callbacks = this._callbacks[id];\n clearTimeout(this._callbacks[id].timeout);\n delete this._callbacks[id];\n const errback = callbacks.errback;\n errback({ error: this._createErrorObject(errorCodes.transportWriteError, 'transport write error') });\n }\n }\n\n private _transportSendCommands(commands: any[]) {\n if (!commands.length) {\n return true;\n }\n if (!this._transport) {\n return false\n }\n try {\n this._transport.send(this._codec.encodeCommands(commands), this._session, this._node);\n } catch (e) {\n this._debug('error writing commands', e);\n this._handleWriteError(commands);\n return false;\n }\n return true;\n }\n\n private _initializeTransport() {\n let websocket: any;\n if (this._config.websocket !== null) {\n websocket = this._config.websocket;\n } else {\n if (!(typeof globalThis.WebSocket !== 'function' && typeof globalThis.WebSocket !== 'object')) {\n websocket = globalThis.WebSocket;\n }\n }\n\n let sockjs = null;\n if (this._config.sockjs !== null) {\n sockjs = this._config.sockjs;\n } else {\n if (typeof globalThis.SockJS !== 'undefined') {\n sockjs = globalThis.SockJS;\n }\n }\n\n let eventsource: any = null;\n if (this._config.eventsource !== null) {\n eventsource = this._config.eventsource;\n } else {\n if (typeof globalThis.EventSource !== 'undefined') {\n eventsource = globalThis.EventSource;\n }\n }\n\n let fetchFunc: any = null;\n if (this._config.fetch !== null) {\n fetchFunc = this._config.fetch;\n } else {\n if (typeof globalThis.fetch !== 'undefined') {\n fetchFunc = globalThis.fetch;\n }\n }\n\n let readableStream: any = null;\n if (this._config.readableStream !== null) {\n readableStream = this._config.readableStream;\n } else {\n if (typeof globalThis.ReadableStream !== 'undefined') {\n readableStream = globalThis.ReadableStream;\n }\n }\n\n if (!this._emulation) {\n if (startsWith(this._endpoint, 'http')) {\n throw new Error('Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport');\n } else {\n this._debug('client will use websocket');\n this._transport = new WebsocketTransport(this._endpoint as string, {\n websocket: websocket,\n httpHeaders: this._config.httpHeaders\n });\n if (!this._transport.supported()) {\n throw new Error('WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options');\n }\n }\n } else {\n if (this._currentTransportIndex >= this._transports.length) {\n this._triedAllTransports = true;\n this._currentTransportIndex = 0;\n }\n let count = 0;\n while (true) {\n if (count >= this._transports.length) {\n throw new Error('no supported transport found');\n }\n const transportConfig = this._transports[this._currentTransportIndex];\n const transportName = transportConfig.transport;\n const transportEndpoint = transportConfig.endpoint;\n\n if (transportName === 'websocket') {\n this._debug('trying websocket transport');\n this._transport = new WebsocketTransport(transportEndpoint, {\n websocket: websocket,\n httpHeaders: this._config.httpHeaders\n });\n if (!this._transport.supported()) {\n this._debug('websocket transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'webtransport') {\n this._debug('trying webtransport transport');\n this._transport = new WebtransportTransport(transportEndpoint, {\n webtransport: globalThis.WebTransport,\n decoder: this._codec,\n encoder: this._codec\n });\n if (!this._transport.supported()) {\n this._debug('webtransport transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'http_stream') {\n this._debug('trying http_stream transport');\n this._transport = new HttpStreamTransport(transportEndpoint, {\n fetch: fetchFunc,\n readableStream: readableStream,\n emulationEndpoint: this._config.emulationEndpoint,\n decoder: this._codec,\n encoder: this._codec\n });\n if (!this._transport.supported()) {\n this._debug('http_stream transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'sse') {\n this._debug('trying sse transport');\n this._transport = new SseTransport(transportEndpoint, {\n eventsource: eventsource,\n fetch: fetchFunc,\n emulationEndpoint: this._config.emulationEndpoint,\n });\n if (!this._transport.supported()) {\n this._debug('sse transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else if (transportName === 'sockjs') {\n this._debug('trying sockjs');\n this._transport = new SockjsTransport(transportEndpoint, {\n sockjs: sockjs,\n sockjsOptions: this._config.sockjsOptions\n });\n if (!this._transport.supported()) {\n this._debug('sockjs transport not available');\n this._currentTransportIndex++;\n count++;\n continue;\n }\n } else {\n throw new Error('unknown transport ' + transportName);\n }\n break;\n }\n }\n\n const self = this;\n const transport = this._transport;\n const transportId = this._nextTransportId();\n self._debug(\"id of transport\", transportId);\n let wasOpen = false;\n const initialCommands: any[] = [];\n\n if (this._transport.emulation()) {\n const connectCommand = self._sendConnect(true);\n initialCommands.push(connectCommand);\n }\n\n this._setNetworkEvents();\n\n const initialData = this._codec.encodeCommands(initialCommands);\n\n this._transportClosed = false;\n\n let connectTimeout: any;\n connectTimeout = setTimeout(function () {\n transport.close();\n }, this._config.timeout);\n\n this._transport.initialize(this._codecName(), {\n onOpen: function () {\n if (connectTimeout) {\n clearTimeout(connectTimeout);\n connectTimeout = null;\n }\n if (self._transportId != transportId) {\n self._debug('open callback from non-actual transport');\n transport.close();\n return;\n }\n wasOpen = true;\n self._debug(transport.subName(), 'transport open');\n if (transport.emulation()) {\n return;\n }\n self._transportIsOpen = true;\n self._transportWasOpen = true;\n self.startBatching();\n self._sendConnect(false);\n self._sendSubscribeCommands();\n self.stopBatching();\n //@ts-ignore must be used only for debug and test purposes. Exposed only for non-emulation transport.\n self.emit('__centrifuge_debug:connect_frame_sent', {})\n },\n onError: function (e: any) {\n if (self._transportId != transportId) {\n self._debug('error callback from non-actual transport');\n return;\n }\n self._debug('transport level error', e);\n },\n onClose: function (closeEvent) {\n if (connectTimeout) {\n clearTimeout(connectTimeout);\n connectTimeout = null;\n }\n if (self._transportId != transportId) {\n self._debug('close callback from non-actual transport');\n return;\n }\n self._debug(transport.subName(), 'transport closed');\n self._transportClosed = true;\n self._transportIsOpen = false;\n\n let reason = 'connection closed';\n let needReconnect = true;\n let code = 0;\n\n if (closeEvent && 'code' in closeEvent && closeEvent.code) {\n code = closeEvent.code;\n }\n\n if (closeEvent && closeEvent.reason) {\n try {\n const advice = JSON.parse(closeEvent.reason);\n reason = advice.reason;\n needReconnect = advice.reconnect;\n } catch (e) {\n reason = closeEvent.reason;\n if ((code >= 3500 && code < 4000) || (code >= 4500 && code < 5000)) {\n needReconnect = false;\n }\n }\n }\n\n if (code < 3000) {\n if (code === 1009) {\n code = disconnectedCodes.messageSizeLimit;\n reason = 'message size limit exceeded';\n needReconnect = false;\n } else {\n code = connectingCodes.transportClosed;\n reason = 'transport closed';\n }\n if (self._emulation && !self._transportWasOpen) {\n self._currentTransportIndex++;\n if (self._currentTransportIndex >= self._transports.length) {\n self._triedAllTransports = true;\n self._currentTransportIndex = 0;\n }\n }\n } else {\n // Codes >= 3000 are sent from a server application level.\n self._transportWasOpen = true;\n }\n\n if (self._isConnecting() && !wasOpen) {\n self.emit('error', {\n type: 'transport',\n error: {\n code: errorCodes.transportClosed,\n message: 'transport closed'\n },\n transport: transport.name()\n });\n }\n\n self._reconnecting = false;\n self._disconnect(code, reason, needReconnect);\n },\n onMessage: function (data) {\n self._dataReceived(data);\n }\n }, initialData);\n //@ts-ignore must be used only for debug and test purposes.\n self.emit('__centrifuge_debug:transport_initialized', {})\n }\n\n private _sendConnect(skipSending: boolean): any {\n const connectCommand = this._constructConnectCommand();\n const self = this;\n this._call(connectCommand, skipSending).then(resolveCtx => {\n const result = resolveCtx.reply.connect;\n self._connectResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._connectError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n return connectCommand;\n }\n\n private _startReconnecting() {\n this._debug('start reconnecting');\n if (!this._isConnecting()) {\n this._debug('stop reconnecting: client not in connecting state');\n return;\n }\n if (this._reconnecting) {\n this._debug('reconnect already in progress, return from reconnect routine');\n return;\n }\n if (this._transportClosed === false) {\n this._debug('waiting for transport close');\n return;\n }\n\n this._reconnecting = true;\n const emptyToken = this._token === '';\n const needTokenRefresh = this._refreshRequired || (emptyToken && this._config.getToken !== null);\n if (!needTokenRefresh) {\n if (this._config.getData) {\n this._config.getData().then(data => {\n if (!this._isConnecting()) {\n return;\n }\n this._data = data;\n this._initializeTransport();\n })\n .catch(e => this._handleGetDataError(e));\n } else {\n this._initializeTransport();\n }\n return;\n }\n\n const self = this;\n this._getToken().then(function (token: string) {\n if (!self._isConnecting()) {\n return;\n }\n if (token == null || token == undefined) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n self._debug('connection token refreshed');\n if (self._config.getData) {\n self._config.getData().then(function (data: any) {\n if (!self._isConnecting()) {\n return;\n }\n self._data = data;\n self._initializeTransport();\n })\n .catch(e => self._handleGetDataError(e));\n } else {\n self._initializeTransport();\n }\n }).catch(function (e) {\n if (!self._isConnecting()) {\n return;\n }\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n 'type': 'connectToken',\n 'error': {\n code: errorCodes.clientConnectToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n const delay = self._getReconnectDelay();\n self._debug('error on getting connection token, reconnect after ' + delay + ' milliseconds', e);\n self._reconnecting = false;\n self._reconnectTimeout = setTimeout(() => {\n self._startReconnecting();\n }, delay);\n });\n }\n\n private _handleGetDataError(e: any): void {\n if (e instanceof UnauthorizedError) {\n this._failUnauthorized();\n return;\n }\n this.emit('error', {\n type: 'connectData',\n error: {\n code: errorCodes.badConfiguration,\n message: e?.toString() || ''\n }\n });\n const delay = this._getReconnectDelay();\n this._debug('error on getting connect data, reconnect after ' + delay + ' milliseconds', e);\n this._reconnecting = false;\n this._reconnectTimeout = setTimeout(() => {\n this._startReconnecting();\n }, delay);\n }\n\n private _connectError(err: any) {\n if (this.state !== State.Connecting) {\n return;\n }\n if (err.code === 109) { // token expired.\n // next connect attempt will try to refresh token.\n this._refreshRequired = true;\n }\n if (err.code < 100 || err.temporary === true || err.code === 109) {\n this.emit('error', {\n 'type': 'connect',\n 'error': err\n });\n this._debug('closing transport due to connect error');\n this._disconnect(err.code, err.message, true);\n } else {\n this._disconnect(err.code, err.message, false);\n }\n }\n\n private _scheduleReconnect() {\n if (!this._isConnecting()) {\n return;\n }\n let isInitialHandshake = false;\n if (this._emulation && !this._transportWasOpen && !this._triedAllTransports) {\n isInitialHandshake = true;\n }\n let delay = this._getReconnectDelay();\n if (isInitialHandshake) {\n delay = 0;\n }\n this._debug('reconnect after ' + delay + ' milliseconds');\n this._clearReconnectTimeout();\n this._reconnectTimeout = setTimeout(() => {\n this._startReconnecting();\n }, delay);\n }\n\n private _constructConnectCommand(): any {\n const req: any = {};\n\n if (this._token) {\n req.token = this._token;\n }\n if (this._data) {\n req.data = this._data;\n }\n if (this._config.name) {\n req.name = this._config.name;\n }\n if (this._config.version) {\n req.version = this._config.version;\n }\n if (Object.keys(this._config.headers).length > 0) {\n req.headers = this._config.headers;\n }\n\n const subs = {};\n let hasSubs = false;\n for (const channel in this._serverSubs) {\n if (this._serverSubs.hasOwnProperty(channel) && this._serverSubs[channel].recoverable) {\n hasSubs = true;\n const sub = {\n 'recover': true\n };\n if (this._serverSubs[channel].offset) {\n sub['offset'] = this._serverSubs[channel].offset;\n }\n if (this._serverSubs[channel].epoch) {\n sub['epoch'] = this._serverSubs[channel].epoch;\n }\n subs[channel] = sub;\n }\n }\n if (hasSubs) {\n req.subs = subs;\n }\n return {\n connect: req\n };\n }\n\n private _getHistoryRequest(channel: string, options?: HistoryOptions) {\n const req: any = {\n channel: channel\n };\n if (options !== undefined) {\n if (options.since) {\n req.since = {\n offset: options.since.offset\n };\n if (options.since.epoch) {\n req.since.epoch = options.since.epoch;\n }\n }\n if (options.limit !== undefined) {\n req.limit = options.limit;\n }\n if (options.reverse === true) {\n req.reverse = true;\n }\n }\n return req;\n }\n\n private _methodCall(): any {\n if (this._isConnected()) {\n return Promise.resolve();\n }\n return new Promise((res, rej) => {\n const timeout = setTimeout(function () {\n rej({ code: errorCodes.timeout, message: 'timeout' });\n }, this._config.timeout);\n this._promises[this._nextPromiseId()] = {\n timeout: timeout,\n resolve: res,\n reject: rej\n };\n });\n }\n\n private _callPromise<T = any>(\n cmd: any,\n resultCB: (reply: any) => T\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n this._call(cmd, false).then(\n (resolveCtx: { reply: any; next?: () => void }) => {\n const result = resultCB(resolveCtx.reply);\n resolve(result);\n resolveCtx.next?.();\n },\n (rejectCtx: { error: any; next?: () => void }) => {\n reject(rejectCtx.error);\n rejectCtx.next?.();\n }\n );\n });\n }\n\n private _dataReceived(data) {\n if (this._serverPing > 0) {\n this._waitServerPing();\n }\n const replies = this._codec.decodeReplies(data);\n // We have to guarantee order of events in replies processing - i.e. start processing\n // next reply only when we finished processing of current one. Without syncing things in\n // this way we could get wrong publication events order as reply promises resolve\n // on next loop tick so for loop continues before we finished emitting all reply events.\n this._dispatchPromise = this._dispatchPromise.then(() => {\n let finishDispatch;\n this._dispatchPromise = new Promise(resolve => {\n finishDispatch = resolve;\n });\n this._dispatchSynchronized(replies, finishDispatch);\n });\n }\n\n private _dispatchSynchronized(replies: any[], finishDispatch: any) {\n let p: Promise<unknown> = Promise.resolve();\n for (const i in replies) {\n if (replies.hasOwnProperty(i)) {\n p = p.then(() => {\n return this._dispatchReply(replies[i]);\n });\n }\n }\n p = p.then(() => {\n finishDispatch();\n });\n }\n\n private _dispatchReply(reply: any) {\n let next: any;\n const p = new Promise(resolve => {\n next = resolve;\n });\n\n if (reply === undefined || reply === null) {\n this._debug('dispatch: got undefined or null reply');\n next();\n return p;\n }\n\n const id = reply.id;\n\n if (id && id > 0) {\n this._handleReply(reply, next);\n } else {\n if (!reply.push) {\n this._handleServerPing(next);\n } else {\n this._handlePush(reply.push, next);\n }\n }\n\n return p;\n }\n\n private _call(cmd: any, skipSending: boolean): Promise<CallResolveContext> {\n return new Promise((resolve, reject) => {\n cmd.id = this._nextCommandId();\n\n this._registerCall(\n cmd.id,\n resolve as (value: CallResolveContext) => void,\n reject as (reason: CallRejectContext) => void\n );\n\n if (!skipSending) {\n this._addCommand(cmd);\n }\n });\n }\n\n private _startConnecting() {\n this._debug('start connecting');\n if (this._setState(State.Connecting)) {\n this.emit('connecting', { code: connectingCodes.connectCalled, reason: 'connect called' });\n }\n this._client = null;\n this._startReconnecting();\n }\n\n private _disconnect(code: number, reason: string, reconnect: boolean) {\n if (this._isDisconnected()) {\n return;\n }\n // we mark transport is closed right away, because _clearConnectedState will move subscriptions to subscribing state\n // if transport will still be open at this time, subscribe frames will be sent to closing transport\n this._transportIsOpen = false;\n const previousState = this.state;\n this._reconnecting = false;\n\n const ctx = {\n code: code,\n reason: reason\n };\n\n let needEvent = false;\n\n if (reconnect) {\n needEvent = this._setState(State.Connecting);\n } else {\n needEvent = this._setState(State.Disconnected);\n this._rejectPromises({ code: errorCodes.clientDisconnected, message: 'disconnected' });\n }\n\n this._clearOutgoingRequests();\n\n if (previousState === State.Connecting) {\n this._clearReconnectTimeout();\n }\n if (previousState === State.Connected) {\n this._clearConnectedState();\n }\n\n if (needEvent) {\n if (this._isConnecting()) {\n this.emit('connecting', ctx);\n } else {\n this.emit('disconnected', ctx);\n }\n }\n\n if (this._transport) {\n this._debug(\"closing existing transport\");\n const transport = this._transport;\n this._transport = null;\n transport.close(); // Close only after setting this._transport to null to avoid recursion when calling transport close().\n // Need to mark as closed here, because connect call may be sync called after disconnect,\n // transport onClose callback will not be called yet\n this._transportClosed = true;\n this._nextTransportId();\n } else {\n this._debug(\"no transport to close\");\n }\n this._scheduleReconnect();\n }\n\n private _failUnauthorized() {\n this._disconnect(disconnectedCodes.unauthorized, 'unauthorized', false);\n }\n\n private _getToken(): Promise<string> {\n this._debug('get connection token');\n if (!this._config.getToken) {\n this.emit('error', {\n type: 'configuration',\n error: {\n code: errorCodes.badConfiguration,\n message: 'token expired but no getToken function set in the configuration'\n }\n });\n return Promise.reject(new UnauthorizedError(''));\n }\n return this._config.getToken({});\n }\n\n private _refresh() {\n const clientId = this._client;\n const self = this;\n this._getToken().then(function (token) {\n if (clientId !== self._client) {\n return;\n }\n if (!token) {\n self._failUnauthorized();\n return;\n }\n self._token = token;\n self._debug('connection token refreshed');\n\n if (!self._isConnected()) {\n return;\n }\n\n const cmd = {\n refresh: { token: self._token }\n };\n\n self._call(cmd, false).then(resolveCtx => {\n const result = resolveCtx.reply.refresh;\n self._refreshResponse(result);\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n self._refreshError(rejectCtx.error);\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n });\n }).catch(function (e) {\n if (!self._isConnected()) {\n return;\n }\n if (e instanceof UnauthorizedError) {\n self._failUnauthorized();\n return;\n }\n self.emit('error', {\n type: 'refreshToken',\n error: {\n code: errorCodes.clientRefreshToken,\n message: e !== undefined ? e.toString() : ''\n }\n });\n self._refreshTimeout = setTimeout(() => self._refresh(), self._getRefreshRetryDelay());\n });\n }\n\n private _refreshError(err: any) {\n if (err.code < 100 || err.temporary === true) {\n this.emit('error', {\n type: 'refresh',\n error: err\n });\n this._refreshTimeout = setTimeout(() => this._refresh(), this._getRefreshRetryDelay());\n } else {\n this._disconnect(err.code, err.message, false);\n }\n }\n\n private _getRefreshRetryDelay() {\n return backoff(0, 5000, 10000);\n }\n\n private _refreshResponse(result: any) {\n if (this._refreshTimeout) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n if (result.expires) {\n this._client = result.client;\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n }\n\n private _removeSubscription(sub: Subscription | null) {\n if (sub === null) {\n return;\n }\n delete this._subs[sub.channel];\n }\n\n protected _unsubscribe(sub: Subscription) {\n if (!this._transportIsOpen) {\n return Promise.resolve();\n }\n const req = {\n channel: sub.channel\n };\n const cmd = { unsubscribe: req };\n\n const self = this;\n\n const unsubscribePromise = new Promise<void>((resolve, _) => {\n this._call(cmd, false).then(resolveCtx => {\n resolve()\n if (resolveCtx.next) {\n resolveCtx.next();\n }\n }, rejectCtx => {\n resolve()\n if (rejectCtx.next) {\n rejectCtx.next();\n }\n self._disconnect(connectingCodes.unsubscribeError, 'unsubscribe error', true);\n });\n });\n\n return unsubscribePromise;\n }\n\n private _getSub(channel: string) {\n const sub = this._subs[channel];\n if (!sub) {\n return null;\n }\n return sub;\n }\n\n private _isServerSub(channel: string) {\n return this._serverSubs[channel] !== undefined;\n }\n\n private _sendSubscribeCommands(): any[] {\n const commands: any[] = [];\n for (const channel in this._subs) {\n if (!this._subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = this._subs[channel];\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n if (sub._inflight === true) {\n continue;\n }\n if (sub.state === SubscriptionState.Subscribing) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n const cmd = sub._subscribe();\n if (cmd) {\n commands.push(cmd);\n }\n }\n }\n return commands;\n }\n\n private _connectResponse(result: any) {\n this._transportIsOpen = true;\n this._transportWasOpen = true;\n this._reconnectAttempts = 0;\n this._refreshRequired = false;\n\n if (this._isConnected()) {\n return;\n }\n\n this._client = result.client;\n this._setState(State.Connected);\n\n if (this._refreshTimeout) {\n clearTimeout(this._refreshTimeout);\n }\n if (result.expires) {\n this._refreshTimeout = setTimeout(() => this._refresh(), ttlMilliseconds(result.ttl));\n }\n\n this._session = result.session;\n this._node = result.node;\n\n this.startBatching();\n this._sendSubscribeCommands();\n this.stopBatching();\n\n const ctx: any = {\n client: result.client,\n transport: this._transport.subName()\n };\n if (result.data) {\n ctx.data = result.data;\n }\n\n this.emit('connected', ctx);\n\n this._resolvePromises();\n\n this._processServerSubs(result.subs || {});\n\n if (result.ping && result.ping > 0) {\n this._serverPing = result.ping * 1000;\n this._sendPong = result.pong === true;\n this._waitServerPing();\n } else {\n this._serverPing = 0;\n }\n }\n\n private _processServerSubs(subs: Record<string, any>) {\n for (const channel in subs) {\n if (!subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = subs[channel];\n this._serverSubs[channel] = {\n 'offset': sub.offset,\n 'epoch': sub.epoch,\n 'recoverable': sub.recoverable || false\n };\n const subCtx = this._getSubscribeContext(channel, sub);\n this.emit('subscribed', subCtx);\n }\n\n for (const channel in subs) {\n if (!subs.hasOwnProperty(channel)) {\n continue;\n }\n const sub = subs[channel];\n if (sub.recovered) {\n const pubs = sub.publications;\n if (pubs && pubs.length > 0) {\n for (const i in pubs) {\n if (pubs.hasOwnProperty(i)) {\n this._handlePublication(channel, pubs[i]);\n }\n }\n }\n }\n }\n\n for (const channel in this._serverSubs) {\n if (!this._serverSubs.hasOwnProperty(channel)) {\n continue;\n }\n if (!subs[channel]) {\n this.emit('unsubscribed', { channel: channel });\n delete this._serverSubs[channel];\n }\n }\n }\n\n private _clearRefreshTimeout() {\n if (this._refreshTimeout !== null) {\n clearTimeout(this._refreshTimeout);\n this._refreshTimeout = null;\n }\n }\n\n private _clearReconnectTimeout() {\n if (this._reconnectTimeout !== null) {\n clearTimeout(this._reconnectTimeout);\n this._reconnectTimeout = null;\n }\n }\n\n private _clearServerPingTimeout() {\n if (this._serverPingTimeout !== null) {\n clearTimeout(this._serverPingTimeout);\n this._serverPingTimeout = null;\n }\n }\n\n private _waitServerPing() {\n if (this._config.maxServerPingDelay === 0) {\n return;\n }\n if (!this._isConnected()) {\n return;\n }\n this._clearServerPingTimeout();\n this._serverPingTimeout = setTimeout(() => {\n if (!this._isConnected()) {\n return;\n }\n this._disconnect(connectingCodes.noPing, 'no ping', true);\n }, this._serverPing + this._config.maxServerPingDelay);\n }\n\n private _getSubscribeContext(channel: string, result: any): SubscribedContext {\n const ctx: any = {\n channel: channel,\n positioned: false,\n recoverable: false,\n wasRecovering: false,\n recovered: false,\n hasRecoveredPublications: false,\n };\n if (result.recovered) {\n ctx.recovered = true;\n }\n if (result.positioned) {\n ctx.positioned = true;\n }\n if (result.recoverable) {\n ctx.recoverable = true;\n }\n if (result.was_recovering) {\n ctx.wasRecovering = true;\n }\n let epoch = '';\n if ('epoch' in result) {\n epoch = result.epoch;\n }\n let offset = 0;\n if ('offset' in result) {\n offset = result.offset;\n }\n if (ctx.positioned || ctx.recoverable) {\n ctx.streamPosition = {\n 'offset': offset,\n 'epoch': epoch\n };\n }\n if (Array.isArray(result.publications) && result.publications.length > 0) {\n ctx.hasRecoveredPublications = true;\n }\n if (result.data) {\n ctx.data = result.data;\n }\n return ctx;\n }\n\n private _handleReply(reply: any, next: any) {\n const id = reply.id;\n if (!(id in this._callbacks)) {\n next();\n return;\n }\n const callbacks = this._callbacks[id];\n clearTimeout(this._callbacks[id].timeout);\n delete this._callbacks[id];\n\n if (!errorExists(reply)) {\n const callback = callbacks.callback;\n if (!callback) {\n return;\n }\n callback({ reply, next });\n } else {\n const errback = callbacks.errback;\n if (!errback) {\n next();\n return;\n }\n const error = {code: reply.error.code, message: reply.error.message || '', temporary: reply.error.temporary || false}\n errback({ error, next });\n }\n }\n\n private _handleJoin(channel: string, join: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = { channel: channel, info: this._getJoinLeaveContext(join.info) };\n this.emit('join', ctx);\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handleJoin(join);\n }\n\n private _handleLeave(channel: string, leave: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = { channel: channel, info: this._getJoinLeaveContext(leave.info) };\n this.emit('leave', ctx);\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handleLeave(leave);\n }\n\n private _handleUnsubscribe(channel: string, unsubscribe: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n delete this._serverSubs[channel];\n this.emit('unsubscribed', { channel: channel });\n }\n return;\n }\n if (unsubscribe.code < 2500) {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setUnsubscribed(unsubscribe.code, unsubscribe.reason, false);\n } else {\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._setSubscribing(unsubscribe.code, unsubscribe.reason);\n }\n }\n\n private _handleSubscribe(channel: string, sub: any) {\n this._serverSubs[channel] = {\n 'offset': sub.offset,\n 'epoch': sub.epoch,\n 'recoverable': sub.recoverable || false\n };\n this.emit('subscribed', this._getSubscribeContext(channel, sub));\n }\n\n private _handleDisconnect(disconnect: any) {\n const code = disconnect.code;\n let reconnect = true;\n if ((code >= 3500 && code < 4000) || (code >= 4500 && code < 5000)) {\n reconnect = false;\n }\n this._disconnect(code, disconnect.reason, reconnect);\n }\n\n private _getPublicationContext(channel: string, pub: any) {\n const ctx: any = {\n channel: channel,\n data: pub.data\n };\n if (pub.offset) {\n ctx.offset = pub.offset;\n }\n if (pub.info) {\n ctx.info = this._getJoinLeaveContext(pub.info);\n }\n if (pub.tags) {\n ctx.tags = pub.tags;\n }\n return ctx;\n }\n\n private _getJoinLeaveContext(clientInfo: any) {\n const info: any = {\n client: clientInfo.client,\n user: clientInfo.user\n };\n const connInfo = clientInfo['conn_info'];\n if (connInfo) {\n info.connInfo = connInfo;\n }\n const chanInfo = clientInfo['chan_info'];\n if (chanInfo) {\n info.chanInfo = chanInfo;\n }\n return info;\n }\n\n private _handlePublication(channel: string, pub: any) {\n const sub = this._getSub(channel);\n if (!sub) {\n if (this._isServerSub(channel)) {\n const ctx = this._getPublicationContext(channel, pub);\n this.emit('publication', ctx);\n if (pub.offset !== undefined) {\n this._serverSubs[channel].offset = pub.offset;\n }\n }\n return;\n }\n // @ts-ignore \u2013 we are hiding some symbols from public API autocompletion.\n sub._handlePublication(pub);\n }\n\n private _handleMessage(message: any) {\n this.emit('message', { data: message.data });\n }\n\n private _handleServerPing(next: any) {\n if (this._sendPong) {\n const cmd = {};\n this._transportSendCommands([cmd]);\n }\n next();\n }\n\n private _handlePush(data: any, next: any) {\n const channel = data.channel;\n if (data.pub) {\n this._handlePublication(channel, data.pub);\n } else if (data.message) {\n this._handleMessage(data.message);\n } else if (data.join) {\n this._handleJoin(channel, data.join);\n } else if (data.leave) {\n this._handleLeave(channel, data.leave);\n } else if (data.unsubscribe) {\n this._handleUnsubscribe(channel, data.unsubscribe);\n } else if (data.subscribe) {\n this._handleSubscribe(channel, data.subscribe);\n } else if (data.disconnect) {\n this._handleDisconnect(data.disconnect);\n }\n next();\n }\n\n private _flush() {\n const commands = this._commands.slice(0);\n this._commands = [];\n this._transportSendCommands(commands);\n }\n\n private _createErrorObject(code: number, message: string, temporary?: boolean) {\n const errObject: any = {\n code: code,\n message: message\n };\n if (temporary) {\n errObject.temporary = true;\n }\n return errObject;\n }\n\n private _registerCall(id: number, callback: any, errback: any) {\n this._callbacks[id] = {\n callback: callback,\n errback: errback,\n timeout: null\n };\n this._callbacks[id].timeout = setTimeout(() => {\n delete this._callbacks[id];\n if (isFunction(errback)) {\n errback({ error: this._createErrorObject(errorCodes.timeout, 'timeout') });\n }\n }, this._config.timeout);\n }\n\n private _addCommand(command: any) {\n if (this._batching) {\n this._commands.push(command);\n } else {\n this._transportSendCommands([command]);\n }\n }\n\n private _nextPromiseId() {\n return ++this._promiseId;\n }\n\n private _nextTransportId() {\n return ++this._transportId;\n }\n\n private _resolvePromises() {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].resolve();\n delete this._promises[id];\n }\n }\n\n private _rejectPromises(err: any) {\n for (const id in this._promises) {\n if (!this._promises.hasOwnProperty(id)) {\n continue;\n }\n if (this._promises[id].timeout) {\n clearTimeout(this._promises[id].timeout);\n }\n this._promises[id].reject(err);\n delete this._promises[id];\n }\n }\n}\n\nCentrifuge.SubscriptionState = SubscriptionState;\nCentrifuge.State = State\nCentrifuge.UnauthorizedError = UnauthorizedError;\n", "import { Writer, Reader } from 'protobufjs/minimal'\nimport { centrifugal } from './client_proto';\nimport { applyDelta } from './fossil';\n\nconst Command = centrifugal.centrifuge.protocol.Command;\nconst Reply = centrifugal.centrifuge.protocol.Reply;\nconst EmulationRequest = centrifugal.centrifuge.protocol.EmulationRequest;\n\n/** @internal */\nexport class ProtobufCodec {\n name(): string {\n return 'protobuf';\n }\n\n encodeEmulationRequest(req: centrifugal.centrifuge.protocol.IEmulationRequest): Uint8Array {\n const writer = Writer.create();\n EmulationRequest.encode(req, writer);\n return writer.finish();\n }\n\n encodeCommands(commands: centrifugal.centrifuge.protocol.ICommand[]): Uint8Array {\n const writer = Writer.create();\n for (const command of commands) {\n writer.fork();\n Command.encodeDelimited(command, writer);\n }\n return writer.finish();\n }\n\n encodeReplies(replies: centrifugal.centrifuge.protocol.IReply[]): Uint8Array {\n const writer = Writer.create();\n for (const reply of replies) {\n writer.fork();\n Reply.encodeDelimited(reply, writer);\n }\n return writer.finish();\n }\n\n decodeReplies(data: ArrayBuffer | Uint8Array): centrifugal.centrifuge.protocol.Reply[] {\n const replies: centrifugal.centrifuge.protocol.Reply[] = [];\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n const reply = Reply.decodeDelimited(reader);\n replies.push(reply);\n }\n return replies;\n }\n\n decodeCommands(data: ArrayBuffer | Uint8Array): centrifugal.centrifuge.protocol.Command[] {\n const commands: centrifugal.centrifuge.protocol.Command[] = [];\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n const reply = Command.decodeDelimited(reader);\n commands.push(reply);\n }\n return commands;\n }\n\n decodeReply(data: ArrayBuffer | Uint8Array): { ok: true; pos: number } | { ok: false } {\n const reader = Reader.create(new Uint8Array(data));\n while (reader.pos < reader.len) {\n Reply.decodeDelimited(reader);\n return {\n ok: true,\n pos: reader.pos\n };\n }\n return {\n ok: false\n };\n }\n\n applyDeltaIfNeeded(pub: centrifugal.centrifuge.protocol.IPublication, prevValue: Uint8Array): { newData: Uint8Array; newPrevValue: Uint8Array } {\n let newData: Uint8Array, newPrevValue: Uint8Array;\n if (pub.delta) {\n // binary delta.\n const valueArray = applyDelta(prevValue, pub.data!);\n newData = new Uint8Array(valueArray)\n newPrevValue = valueArray;\n } else {\n // full binary data.\n newData = pub.data!;\n newPrevValue = pub.data!;\n }\n return { newData, newPrevValue }\n }\n}\n", "/*eslint-disable*/\nimport * as $protobuf from \"protobufjs/minimal\";\n\n// Common aliases\nconst $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n// Exported root namespace\nconst $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\nexport const centrifugal = $root.centrifugal = (() => {\n\n /**\n * Namespace centrifugal.\n * @exports centrifugal\n * @namespace\n */\n const centrifugal = {};\n\n centrifugal.centrifuge = (function() {\n\n /**\n * Namespace centrifuge.\n * @memberof centrifugal\n * @namespace\n */\n const centrifuge = {};\n\n centrifuge.protocol = (function() {\n\n /**\n * Namespace protocol.\n * @memberof centrifugal.centrifuge\n * @namespace\n */\n const protocol = {};\n\n protocol.Error = (function() {\n\n /**\n * Properties of an Error.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IError\n * @property {number|null} [code] Error code\n * @property {string|null} [message] Error message\n * @property {boolean|null} [temporary] Error temporary\n */\n\n /**\n * Constructs a new Error.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an Error.\n * @implements IError\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IError=} [properties] Properties to set\n */\n function Error(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Error code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.code = 0;\n\n /**\n * Error message.\n * @member {string} message\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.message = \"\";\n\n /**\n * Error temporary.\n * @member {boolean} temporary\n * @memberof centrifugal.centrifuge.protocol.Error\n * @instance\n */\n Error.prototype.temporary = false;\n\n /**\n * Encodes the specified Error message. Does not implicitly {@link centrifugal.centrifuge.protocol.Error.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {centrifugal.centrifuge.protocol.IError} message Error message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Error.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code);\n if (message.message != null && Object.hasOwnProperty.call(message, \"message\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);\n if (message.temporary != null && Object.hasOwnProperty.call(message, \"temporary\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.temporary);\n return writer;\n };\n\n /**\n * Encodes the specified Error message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Error.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {centrifugal.centrifuge.protocol.IError} message Error message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Error.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Error message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Error} Error\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Error.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Error();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.code = reader.uint32();\n break;\n }\n case 2: {\n message.message = reader.string();\n break;\n }\n case 3: {\n message.temporary = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Error message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Error} Error\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Error.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Error message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Error.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.message != null && message.hasOwnProperty(\"message\"))\n if (!$util.isString(message.message))\n return \"message: string expected\";\n if (message.temporary != null && message.hasOwnProperty(\"temporary\"))\n if (typeof message.temporary !== \"boolean\")\n return \"temporary: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Error\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Error\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Error\";\n };\n\n return Error;\n })();\n\n protocol.EmulationRequest = (function() {\n\n /**\n * Properties of an EmulationRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IEmulationRequest\n * @property {string|null} [node] EmulationRequest node\n * @property {string|null} [session] EmulationRequest session\n * @property {Uint8Array|null} [data] EmulationRequest data\n */\n\n /**\n * Constructs a new EmulationRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an EmulationRequest.\n * @implements IEmulationRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest=} [properties] Properties to set\n */\n function EmulationRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EmulationRequest node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.node = \"\";\n\n /**\n * EmulationRequest session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.session = \"\";\n\n /**\n * EmulationRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @instance\n */\n EmulationRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified EmulationRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.EmulationRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest} message EmulationRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EmulationRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.node);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.session);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified EmulationRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.EmulationRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IEmulationRequest} message EmulationRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EmulationRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EmulationRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.EmulationRequest} EmulationRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EmulationRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.EmulationRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.node = reader.string();\n break;\n }\n case 2: {\n message.session = reader.string();\n break;\n }\n case 3: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EmulationRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.EmulationRequest} EmulationRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EmulationRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EmulationRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EmulationRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for EmulationRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.EmulationRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n EmulationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.EmulationRequest\";\n };\n\n return EmulationRequest;\n })();\n\n protocol.Command = (function() {\n\n /**\n * Properties of a Command.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ICommand\n * @property {number|null} [id] Command id\n * @property {centrifugal.centrifuge.protocol.IConnectRequest|null} [connect] Command connect\n * @property {centrifugal.centrifuge.protocol.ISubscribeRequest|null} [subscribe] Command subscribe\n * @property {centrifugal.centrifuge.protocol.IUnsubscribeRequest|null} [unsubscribe] Command unsubscribe\n * @property {centrifugal.centrifuge.protocol.IPublishRequest|null} [publish] Command publish\n * @property {centrifugal.centrifuge.protocol.IPresenceRequest|null} [presence] Command presence\n * @property {centrifugal.centrifuge.protocol.IPresenceStatsRequest|null} [presence_stats] Command presence_stats\n * @property {centrifugal.centrifuge.protocol.IHistoryRequest|null} [history] Command history\n * @property {centrifugal.centrifuge.protocol.IPingRequest|null} [ping] Command ping\n * @property {centrifugal.centrifuge.protocol.ISendRequest|null} [send] Command send\n * @property {centrifugal.centrifuge.protocol.IRPCRequest|null} [rpc] Command rpc\n * @property {centrifugal.centrifuge.protocol.IRefreshRequest|null} [refresh] Command refresh\n * @property {centrifugal.centrifuge.protocol.ISubRefreshRequest|null} [sub_refresh] Command sub_refresh\n */\n\n /**\n * Constructs a new Command.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Command.\n * @implements ICommand\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ICommand=} [properties] Properties to set\n */\n function Command(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Command id.\n * @member {number} id\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.id = 0;\n\n /**\n * Command connect.\n * @member {centrifugal.centrifuge.protocol.IConnectRequest|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.connect = null;\n\n /**\n * Command subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribeRequest|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.subscribe = null;\n\n /**\n * Command unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribeRequest|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.unsubscribe = null;\n\n /**\n * Command publish.\n * @member {centrifugal.centrifuge.protocol.IPublishRequest|null|undefined} publish\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.publish = null;\n\n /**\n * Command presence.\n * @member {centrifugal.centrifuge.protocol.IPresenceRequest|null|undefined} presence\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.presence = null;\n\n /**\n * Command presence_stats.\n * @member {centrifugal.centrifuge.protocol.IPresenceStatsRequest|null|undefined} presence_stats\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.presence_stats = null;\n\n /**\n * Command history.\n * @member {centrifugal.centrifuge.protocol.IHistoryRequest|null|undefined} history\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.history = null;\n\n /**\n * Command ping.\n * @member {centrifugal.centrifuge.protocol.IPingRequest|null|undefined} ping\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.ping = null;\n\n /**\n * Command send.\n * @member {centrifugal.centrifuge.protocol.ISendRequest|null|undefined} send\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.send = null;\n\n /**\n * Command rpc.\n * @member {centrifugal.centrifuge.protocol.IRPCRequest|null|undefined} rpc\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.rpc = null;\n\n /**\n * Command refresh.\n * @member {centrifugal.centrifuge.protocol.IRefreshRequest|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.refresh = null;\n\n /**\n * Command sub_refresh.\n * @member {centrifugal.centrifuge.protocol.ISubRefreshRequest|null|undefined} sub_refresh\n * @memberof centrifugal.centrifuge.protocol.Command\n * @instance\n */\n Command.prototype.sub_refresh = null;\n\n /**\n * Encodes the specified Command message. Does not implicitly {@link centrifugal.centrifuge.protocol.Command.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {centrifugal.centrifuge.protocol.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.id != null && Object.hasOwnProperty.call(message, \"id\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id);\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.ConnectRequest.encode(message.connect, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.SubscribeRequest.encode(message.subscribe, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.encode(message.unsubscribe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.publish != null && Object.hasOwnProperty.call(message, \"publish\"))\n $root.centrifugal.centrifuge.protocol.PublishRequest.encode(message.publish, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n $root.centrifugal.centrifuge.protocol.PresenceRequest.encode(message.presence, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.presence_stats != null && Object.hasOwnProperty.call(message, \"presence_stats\"))\n $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.encode(message.presence_stats, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.history != null && Object.hasOwnProperty.call(message, \"history\"))\n $root.centrifugal.centrifuge.protocol.HistoryRequest.encode(message.history, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n $root.centrifugal.centrifuge.protocol.PingRequest.encode(message.ping, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.send != null && Object.hasOwnProperty.call(message, \"send\"))\n $root.centrifugal.centrifuge.protocol.SendRequest.encode(message.send, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n if (message.rpc != null && Object.hasOwnProperty.call(message, \"rpc\"))\n $root.centrifugal.centrifuge.protocol.RPCRequest.encode(message.rpc, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.RefreshRequest.encode(message.refresh, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();\n if (message.sub_refresh != null && Object.hasOwnProperty.call(message, \"sub_refresh\"))\n $root.centrifugal.centrifuge.protocol.SubRefreshRequest.encode(message.sub_refresh, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Command message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Command.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {centrifugal.centrifuge.protocol.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Command();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.id = reader.uint32();\n break;\n }\n case 4: {\n message.connect = $root.centrifugal.centrifuge.protocol.ConnectRequest.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.SubscribeRequest.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.publish = $root.centrifugal.centrifuge.protocol.PublishRequest.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.presence = $root.centrifugal.centrifuge.protocol.PresenceRequest.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.presence_stats = $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.history = $root.centrifugal.centrifuge.protocol.HistoryRequest.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.ping = $root.centrifugal.centrifuge.protocol.PingRequest.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.send = $root.centrifugal.centrifuge.protocol.SendRequest.decode(reader, reader.uint32());\n break;\n }\n case 13: {\n message.rpc = $root.centrifugal.centrifuge.protocol.RPCRequest.decode(reader, reader.uint32());\n break;\n }\n case 14: {\n message.refresh = $root.centrifugal.centrifuge.protocol.RefreshRequest.decode(reader, reader.uint32());\n break;\n }\n case 15: {\n message.sub_refresh = $root.centrifugal.centrifuge.protocol.SubRefreshRequest.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Command message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Command.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\"))\n if (!$util.isInteger(message.id))\n return \"id: integer expected\";\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.ConnectRequest.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeRequest.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.UnsubscribeRequest.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.publish != null && message.hasOwnProperty(\"publish\")) {\n let error = $root.centrifugal.centrifuge.protocol.PublishRequest.verify(message.publish);\n if (error)\n return \"publish.\" + error;\n }\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceRequest.verify(message.presence);\n if (error)\n return \"presence.\" + error;\n }\n if (message.presence_stats != null && message.hasOwnProperty(\"presence_stats\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceStatsRequest.verify(message.presence_stats);\n if (error)\n return \"presence_stats.\" + error;\n }\n if (message.history != null && message.hasOwnProperty(\"history\")) {\n let error = $root.centrifugal.centrifuge.protocol.HistoryRequest.verify(message.history);\n if (error)\n return \"history.\" + error;\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\")) {\n let error = $root.centrifugal.centrifuge.protocol.PingRequest.verify(message.ping);\n if (error)\n return \"ping.\" + error;\n }\n if (message.send != null && message.hasOwnProperty(\"send\")) {\n let error = $root.centrifugal.centrifuge.protocol.SendRequest.verify(message.send);\n if (error)\n return \"send.\" + error;\n }\n if (message.rpc != null && message.hasOwnProperty(\"rpc\")) {\n let error = $root.centrifugal.centrifuge.protocol.RPCRequest.verify(message.rpc);\n if (error)\n return \"rpc.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.RefreshRequest.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n if (message.sub_refresh != null && message.hasOwnProperty(\"sub_refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubRefreshRequest.verify(message.sub_refresh);\n if (error)\n return \"sub_refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Command\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Command\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Command.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Command\";\n };\n\n return Command;\n })();\n\n protocol.Reply = (function() {\n\n /**\n * Properties of a Reply.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IReply\n * @property {number|null} [id] Reply id\n * @property {centrifugal.centrifuge.protocol.IError|null} [error] Reply error\n * @property {centrifugal.centrifuge.protocol.IPush|null} [push] Reply push\n * @property {centrifugal.centrifuge.protocol.IConnectResult|null} [connect] Reply connect\n * @property {centrifugal.centrifuge.protocol.ISubscribeResult|null} [subscribe] Reply subscribe\n * @property {centrifugal.centrifuge.protocol.IUnsubscribeResult|null} [unsubscribe] Reply unsubscribe\n * @property {centrifugal.centrifuge.protocol.IPublishResult|null} [publish] Reply publish\n * @property {centrifugal.centrifuge.protocol.IPresenceResult|null} [presence] Reply presence\n * @property {centrifugal.centrifuge.protocol.IPresenceStatsResult|null} [presence_stats] Reply presence_stats\n * @property {centrifugal.centrifuge.protocol.IHistoryResult|null} [history] Reply history\n * @property {centrifugal.centrifuge.protocol.IPingResult|null} [ping] Reply ping\n * @property {centrifugal.centrifuge.protocol.IRPCResult|null} [rpc] Reply rpc\n * @property {centrifugal.centrifuge.protocol.IRefreshResult|null} [refresh] Reply refresh\n * @property {centrifugal.centrifuge.protocol.ISubRefreshResult|null} [sub_refresh] Reply sub_refresh\n */\n\n /**\n * Constructs a new Reply.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Reply.\n * @implements IReply\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IReply=} [properties] Properties to set\n */\n function Reply(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Reply id.\n * @member {number} id\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.id = 0;\n\n /**\n * Reply error.\n * @member {centrifugal.centrifuge.protocol.IError|null|undefined} error\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.error = null;\n\n /**\n * Reply push.\n * @member {centrifugal.centrifuge.protocol.IPush|null|undefined} push\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.push = null;\n\n /**\n * Reply connect.\n * @member {centrifugal.centrifuge.protocol.IConnectResult|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.connect = null;\n\n /**\n * Reply subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribeResult|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.subscribe = null;\n\n /**\n * Reply unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribeResult|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.unsubscribe = null;\n\n /**\n * Reply publish.\n * @member {centrifugal.centrifuge.protocol.IPublishResult|null|undefined} publish\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.publish = null;\n\n /**\n * Reply presence.\n * @member {centrifugal.centrifuge.protocol.IPresenceResult|null|undefined} presence\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.presence = null;\n\n /**\n * Reply presence_stats.\n * @member {centrifugal.centrifuge.protocol.IPresenceStatsResult|null|undefined} presence_stats\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.presence_stats = null;\n\n /**\n * Reply history.\n * @member {centrifugal.centrifuge.protocol.IHistoryResult|null|undefined} history\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.history = null;\n\n /**\n * Reply ping.\n * @member {centrifugal.centrifuge.protocol.IPingResult|null|undefined} ping\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.ping = null;\n\n /**\n * Reply rpc.\n * @member {centrifugal.centrifuge.protocol.IRPCResult|null|undefined} rpc\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.rpc = null;\n\n /**\n * Reply refresh.\n * @member {centrifugal.centrifuge.protocol.IRefreshResult|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.refresh = null;\n\n /**\n * Reply sub_refresh.\n * @member {centrifugal.centrifuge.protocol.ISubRefreshResult|null|undefined} sub_refresh\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @instance\n */\n Reply.prototype.sub_refresh = null;\n\n /**\n * Encodes the specified Reply message. Does not implicitly {@link centrifugal.centrifuge.protocol.Reply.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {centrifugal.centrifuge.protocol.IReply} message Reply message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reply.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.id != null && Object.hasOwnProperty.call(message, \"id\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id);\n if (message.error != null && Object.hasOwnProperty.call(message, \"error\"))\n $root.centrifugal.centrifuge.protocol.Error.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.push != null && Object.hasOwnProperty.call(message, \"push\"))\n $root.centrifugal.centrifuge.protocol.Push.encode(message.push, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.ConnectResult.encode(message.connect, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subscribe, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.UnsubscribeResult.encode(message.unsubscribe, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.publish != null && Object.hasOwnProperty.call(message, \"publish\"))\n $root.centrifugal.centrifuge.protocol.PublishResult.encode(message.publish, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n $root.centrifugal.centrifuge.protocol.PresenceResult.encode(message.presence, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.presence_stats != null && Object.hasOwnProperty.call(message, \"presence_stats\"))\n $root.centrifugal.centrifuge.protocol.PresenceStatsResult.encode(message.presence_stats, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.history != null && Object.hasOwnProperty.call(message, \"history\"))\n $root.centrifugal.centrifuge.protocol.HistoryResult.encode(message.history, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n $root.centrifugal.centrifuge.protocol.PingResult.encode(message.ping, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n if (message.rpc != null && Object.hasOwnProperty.call(message, \"rpc\"))\n $root.centrifugal.centrifuge.protocol.RPCResult.encode(message.rpc, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.RefreshResult.encode(message.refresh, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();\n if (message.sub_refresh != null && Object.hasOwnProperty.call(message, \"sub_refresh\"))\n $root.centrifugal.centrifuge.protocol.SubRefreshResult.encode(message.sub_refresh, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Reply message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Reply.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {centrifugal.centrifuge.protocol.IReply} message Reply message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reply.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Reply message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Reply} Reply\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reply.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Reply();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.id = reader.uint32();\n break;\n }\n case 2: {\n message.error = $root.centrifugal.centrifuge.protocol.Error.decode(reader, reader.uint32());\n break;\n }\n case 4: {\n message.push = $root.centrifugal.centrifuge.protocol.Push.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.connect = $root.centrifugal.centrifuge.protocol.ConnectResult.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.UnsubscribeResult.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.publish = $root.centrifugal.centrifuge.protocol.PublishResult.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.presence = $root.centrifugal.centrifuge.protocol.PresenceResult.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.presence_stats = $root.centrifugal.centrifuge.protocol.PresenceStatsResult.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.history = $root.centrifugal.centrifuge.protocol.HistoryResult.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.ping = $root.centrifugal.centrifuge.protocol.PingResult.decode(reader, reader.uint32());\n break;\n }\n case 13: {\n message.rpc = $root.centrifugal.centrifuge.protocol.RPCResult.decode(reader, reader.uint32());\n break;\n }\n case 14: {\n message.refresh = $root.centrifugal.centrifuge.protocol.RefreshResult.decode(reader, reader.uint32());\n break;\n }\n case 15: {\n message.sub_refresh = $root.centrifugal.centrifuge.protocol.SubRefreshResult.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Reply message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Reply} Reply\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reply.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Reply message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Reply.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.id != null && message.hasOwnProperty(\"id\"))\n if (!$util.isInteger(message.id))\n return \"id: integer expected\";\n if (message.error != null && message.hasOwnProperty(\"error\")) {\n let error = $root.centrifugal.centrifuge.protocol.Error.verify(message.error);\n if (error)\n return \"error.\" + error;\n }\n if (message.push != null && message.hasOwnProperty(\"push\")) {\n let error = $root.centrifugal.centrifuge.protocol.Push.verify(message.push);\n if (error)\n return \"push.\" + error;\n }\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.ConnectResult.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.UnsubscribeResult.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.publish != null && message.hasOwnProperty(\"publish\")) {\n let error = $root.centrifugal.centrifuge.protocol.PublishResult.verify(message.publish);\n if (error)\n return \"publish.\" + error;\n }\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceResult.verify(message.presence);\n if (error)\n return \"presence.\" + error;\n }\n if (message.presence_stats != null && message.hasOwnProperty(\"presence_stats\")) {\n let error = $root.centrifugal.centrifuge.protocol.PresenceStatsResult.verify(message.presence_stats);\n if (error)\n return \"presence_stats.\" + error;\n }\n if (message.history != null && message.hasOwnProperty(\"history\")) {\n let error = $root.centrifugal.centrifuge.protocol.HistoryResult.verify(message.history);\n if (error)\n return \"history.\" + error;\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\")) {\n let error = $root.centrifugal.centrifuge.protocol.PingResult.verify(message.ping);\n if (error)\n return \"ping.\" + error;\n }\n if (message.rpc != null && message.hasOwnProperty(\"rpc\")) {\n let error = $root.centrifugal.centrifuge.protocol.RPCResult.verify(message.rpc);\n if (error)\n return \"rpc.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.RefreshResult.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n if (message.sub_refresh != null && message.hasOwnProperty(\"sub_refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.SubRefreshResult.verify(message.sub_refresh);\n if (error)\n return \"sub_refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Reply\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Reply\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Reply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Reply\";\n };\n\n return Reply;\n })();\n\n protocol.Push = (function() {\n\n /**\n * Properties of a Push.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPush\n * @property {string|null} [channel] Push channel\n * @property {centrifugal.centrifuge.protocol.IPublication|null} [pub] Push pub\n * @property {centrifugal.centrifuge.protocol.IJoin|null} [join] Push join\n * @property {centrifugal.centrifuge.protocol.ILeave|null} [leave] Push leave\n * @property {centrifugal.centrifuge.protocol.IUnsubscribe|null} [unsubscribe] Push unsubscribe\n * @property {centrifugal.centrifuge.protocol.IMessage|null} [message] Push message\n * @property {centrifugal.centrifuge.protocol.ISubscribe|null} [subscribe] Push subscribe\n * @property {centrifugal.centrifuge.protocol.IConnect|null} [connect] Push connect\n * @property {centrifugal.centrifuge.protocol.IDisconnect|null} [disconnect] Push disconnect\n * @property {centrifugal.centrifuge.protocol.IRefresh|null} [refresh] Push refresh\n */\n\n /**\n * Constructs a new Push.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Push.\n * @implements IPush\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPush=} [properties] Properties to set\n */\n function Push(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Push channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.channel = \"\";\n\n /**\n * Push pub.\n * @member {centrifugal.centrifuge.protocol.IPublication|null|undefined} pub\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.pub = null;\n\n /**\n * Push join.\n * @member {centrifugal.centrifuge.protocol.IJoin|null|undefined} join\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.join = null;\n\n /**\n * Push leave.\n * @member {centrifugal.centrifuge.protocol.ILeave|null|undefined} leave\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.leave = null;\n\n /**\n * Push unsubscribe.\n * @member {centrifugal.centrifuge.protocol.IUnsubscribe|null|undefined} unsubscribe\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.unsubscribe = null;\n\n /**\n * Push message.\n * @member {centrifugal.centrifuge.protocol.IMessage|null|undefined} message\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.message = null;\n\n /**\n * Push subscribe.\n * @member {centrifugal.centrifuge.protocol.ISubscribe|null|undefined} subscribe\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.subscribe = null;\n\n /**\n * Push connect.\n * @member {centrifugal.centrifuge.protocol.IConnect|null|undefined} connect\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.connect = null;\n\n /**\n * Push disconnect.\n * @member {centrifugal.centrifuge.protocol.IDisconnect|null|undefined} disconnect\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.disconnect = null;\n\n /**\n * Push refresh.\n * @member {centrifugal.centrifuge.protocol.IRefresh|null|undefined} refresh\n * @memberof centrifugal.centrifuge.protocol.Push\n * @instance\n */\n Push.prototype.refresh = null;\n\n /**\n * Encodes the specified Push message. Does not implicitly {@link centrifugal.centrifuge.protocol.Push.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {centrifugal.centrifuge.protocol.IPush} message Push message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Push.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel);\n if (message.pub != null && Object.hasOwnProperty.call(message, \"pub\"))\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.pub, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.join != null && Object.hasOwnProperty.call(message, \"join\"))\n $root.centrifugal.centrifuge.protocol.Join.encode(message.join, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.leave != null && Object.hasOwnProperty.call(message, \"leave\"))\n $root.centrifugal.centrifuge.protocol.Leave.encode(message.leave, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.unsubscribe != null && Object.hasOwnProperty.call(message, \"unsubscribe\"))\n $root.centrifugal.centrifuge.protocol.Unsubscribe.encode(message.unsubscribe, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.message != null && Object.hasOwnProperty.call(message, \"message\"))\n $root.centrifugal.centrifuge.protocol.Message.encode(message.message, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.subscribe != null && Object.hasOwnProperty.call(message, \"subscribe\"))\n $root.centrifugal.centrifuge.protocol.Subscribe.encode(message.subscribe, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.connect != null && Object.hasOwnProperty.call(message, \"connect\"))\n $root.centrifugal.centrifuge.protocol.Connect.encode(message.connect, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();\n if (message.disconnect != null && Object.hasOwnProperty.call(message, \"disconnect\"))\n $root.centrifugal.centrifuge.protocol.Disconnect.encode(message.disconnect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n if (message.refresh != null && Object.hasOwnProperty.call(message, \"refresh\"))\n $root.centrifugal.centrifuge.protocol.Refresh.encode(message.refresh, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Push message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Push.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {centrifugal.centrifuge.protocol.IPush} message Push message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Push.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Push message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Push} Push\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Push.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Push();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n message.channel = reader.string();\n break;\n }\n case 4: {\n message.pub = $root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32());\n break;\n }\n case 5: {\n message.join = $root.centrifugal.centrifuge.protocol.Join.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.leave = $root.centrifugal.centrifuge.protocol.Leave.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.unsubscribe = $root.centrifugal.centrifuge.protocol.Unsubscribe.decode(reader, reader.uint32());\n break;\n }\n case 8: {\n message.message = $root.centrifugal.centrifuge.protocol.Message.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.subscribe = $root.centrifugal.centrifuge.protocol.Subscribe.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.connect = $root.centrifugal.centrifuge.protocol.Connect.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.disconnect = $root.centrifugal.centrifuge.protocol.Disconnect.decode(reader, reader.uint32());\n break;\n }\n case 12: {\n message.refresh = $root.centrifugal.centrifuge.protocol.Refresh.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Push message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Push} Push\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Push.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Push message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Push.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.pub != null && message.hasOwnProperty(\"pub\")) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.pub);\n if (error)\n return \"pub.\" + error;\n }\n if (message.join != null && message.hasOwnProperty(\"join\")) {\n let error = $root.centrifugal.centrifuge.protocol.Join.verify(message.join);\n if (error)\n return \"join.\" + error;\n }\n if (message.leave != null && message.hasOwnProperty(\"leave\")) {\n let error = $root.centrifugal.centrifuge.protocol.Leave.verify(message.leave);\n if (error)\n return \"leave.\" + error;\n }\n if (message.unsubscribe != null && message.hasOwnProperty(\"unsubscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.Unsubscribe.verify(message.unsubscribe);\n if (error)\n return \"unsubscribe.\" + error;\n }\n if (message.message != null && message.hasOwnProperty(\"message\")) {\n let error = $root.centrifugal.centrifuge.protocol.Message.verify(message.message);\n if (error)\n return \"message.\" + error;\n }\n if (message.subscribe != null && message.hasOwnProperty(\"subscribe\")) {\n let error = $root.centrifugal.centrifuge.protocol.Subscribe.verify(message.subscribe);\n if (error)\n return \"subscribe.\" + error;\n }\n if (message.connect != null && message.hasOwnProperty(\"connect\")) {\n let error = $root.centrifugal.centrifuge.protocol.Connect.verify(message.connect);\n if (error)\n return \"connect.\" + error;\n }\n if (message.disconnect != null && message.hasOwnProperty(\"disconnect\")) {\n let error = $root.centrifugal.centrifuge.protocol.Disconnect.verify(message.disconnect);\n if (error)\n return \"disconnect.\" + error;\n }\n if (message.refresh != null && message.hasOwnProperty(\"refresh\")) {\n let error = $root.centrifugal.centrifuge.protocol.Refresh.verify(message.refresh);\n if (error)\n return \"refresh.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Push\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Push\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Push.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Push\";\n };\n\n return Push;\n })();\n\n protocol.ClientInfo = (function() {\n\n /**\n * Properties of a ClientInfo.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IClientInfo\n * @property {string|null} [user] ClientInfo user\n * @property {string|null} [client] ClientInfo client\n * @property {Uint8Array|null} [conn_info] ClientInfo conn_info\n * @property {Uint8Array|null} [chan_info] ClientInfo chan_info\n */\n\n /**\n * Constructs a new ClientInfo.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ClientInfo.\n * @implements IClientInfo\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IClientInfo=} [properties] Properties to set\n */\n function ClientInfo(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ClientInfo user.\n * @member {string} user\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.user = \"\";\n\n /**\n * ClientInfo client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.client = \"\";\n\n /**\n * ClientInfo conn_info.\n * @member {Uint8Array} conn_info\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.conn_info = $util.newBuffer([]);\n\n /**\n * ClientInfo chan_info.\n * @member {Uint8Array} chan_info\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @instance\n */\n ClientInfo.prototype.chan_info = $util.newBuffer([]);\n\n /**\n * Encodes the specified ClientInfo message. Does not implicitly {@link centrifugal.centrifuge.protocol.ClientInfo.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {centrifugal.centrifuge.protocol.IClientInfo} message ClientInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ClientInfo.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.user != null && Object.hasOwnProperty.call(message, \"user\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.user);\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.client);\n if (message.conn_info != null && Object.hasOwnProperty.call(message, \"conn_info\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conn_info);\n if (message.chan_info != null && Object.hasOwnProperty.call(message, \"chan_info\"))\n writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.chan_info);\n return writer;\n };\n\n /**\n * Encodes the specified ClientInfo message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ClientInfo.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {centrifugal.centrifuge.protocol.IClientInfo} message ClientInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ClientInfo.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ClientInfo message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ClientInfo} ClientInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ClientInfo.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ClientInfo();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.user = reader.string();\n break;\n }\n case 2: {\n message.client = reader.string();\n break;\n }\n case 3: {\n message.conn_info = reader.bytes();\n break;\n }\n case 4: {\n message.chan_info = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ClientInfo message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ClientInfo} ClientInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ClientInfo.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ClientInfo message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ClientInfo.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.user != null && message.hasOwnProperty(\"user\"))\n if (!$util.isString(message.user))\n return \"user: string expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.conn_info != null && message.hasOwnProperty(\"conn_info\"))\n if (!(message.conn_info && typeof message.conn_info.length === \"number\" || $util.isString(message.conn_info)))\n return \"conn_info: buffer expected\";\n if (message.chan_info != null && message.hasOwnProperty(\"chan_info\"))\n if (!(message.chan_info && typeof message.chan_info.length === \"number\" || $util.isString(message.chan_info)))\n return \"chan_info: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for ClientInfo\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ClientInfo\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ClientInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ClientInfo\";\n };\n\n return ClientInfo;\n })();\n\n protocol.Publication = (function() {\n\n /**\n * Properties of a Publication.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublication\n * @property {Uint8Array|null} [data] Publication data\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Publication info\n * @property {number|Long|null} [offset] Publication offset\n * @property {Object.<string,string>|null} [tags] Publication tags\n * @property {boolean|null} [delta] Publication delta\n * @property {number|Long|null} [time] Publication time\n * @property {string|null} [channel] Publication channel\n */\n\n /**\n * Constructs a new Publication.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Publication.\n * @implements IPublication\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublication=} [properties] Properties to set\n */\n function Publication(properties) {\n this.tags = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Publication data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.data = $util.newBuffer([]);\n\n /**\n * Publication info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.info = null;\n\n /**\n * Publication offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Publication tags.\n * @member {Object.<string,string>} tags\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.tags = $util.emptyObject;\n\n /**\n * Publication delta.\n * @member {boolean} delta\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.delta = false;\n\n /**\n * Publication time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Publication channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @instance\n */\n Publication.prototype.channel = \"\";\n\n /**\n * Encodes the specified Publication message. Does not implicitly {@link centrifugal.centrifuge.protocol.Publication.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublication} message Publication message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Publication.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data);\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.offset);\n if (message.tags != null && Object.hasOwnProperty.call(message, \"tags\"))\n for (let keys = Object.keys(message.tags), i = 0; i < keys.length; ++i)\n writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim();\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.delta);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 9, wireType 0 =*/72).int64(message.time);\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified Publication message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Publication.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublication} message Publication message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Publication.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Publication message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Publication} Publication\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Publication.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Publication(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 4: {\n message.data = reader.bytes();\n break;\n }\n case 5: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.offset = reader.uint64();\n break;\n }\n case 7: {\n if (message.tags === $util.emptyObject)\n message.tags = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = \"\";\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = reader.string();\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.tags[key] = value;\n break;\n }\n case 8: {\n message.delta = reader.bool();\n break;\n }\n case 9: {\n message.time = reader.int64();\n break;\n }\n case 10: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Publication message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Publication} Publication\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Publication.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Publication message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Publication.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.tags != null && message.hasOwnProperty(\"tags\")) {\n if (!$util.isObject(message.tags))\n return \"tags: object expected\";\n let key = Object.keys(message.tags);\n for (let i = 0; i < key.length; ++i)\n if (!$util.isString(message.tags[key[i]]))\n return \"tags: string{k:string} expected\";\n }\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (typeof message.delta !== \"boolean\")\n return \"delta: boolean expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Publication\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Publication\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Publication.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Publication\";\n };\n\n return Publication;\n })();\n\n protocol.Join = (function() {\n\n /**\n * Properties of a Join.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IJoin\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Join info\n */\n\n /**\n * Constructs a new Join.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Join.\n * @implements IJoin\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IJoin=} [properties] Properties to set\n */\n function Join(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Join info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Join\n * @instance\n */\n Join.prototype.info = null;\n\n /**\n * Encodes the specified Join message. Does not implicitly {@link centrifugal.centrifuge.protocol.Join.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {centrifugal.centrifuge.protocol.IJoin} message Join message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Join.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Join message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Join.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {centrifugal.centrifuge.protocol.IJoin} message Join message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Join.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Join message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Join} Join\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Join.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Join();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Join message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Join} Join\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Join.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Join message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Join.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Join\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Join\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Join.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Join\";\n };\n\n return Join;\n })();\n\n protocol.Leave = (function() {\n\n /**\n * Properties of a Leave.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ILeave\n * @property {centrifugal.centrifuge.protocol.IClientInfo|null} [info] Leave info\n */\n\n /**\n * Constructs a new Leave.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Leave.\n * @implements ILeave\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ILeave=} [properties] Properties to set\n */\n function Leave(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Leave info.\n * @member {centrifugal.centrifuge.protocol.IClientInfo|null|undefined} info\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @instance\n */\n Leave.prototype.info = null;\n\n /**\n * Encodes the specified Leave message. Does not implicitly {@link centrifugal.centrifuge.protocol.Leave.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {centrifugal.centrifuge.protocol.ILeave} message Leave message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Leave.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.info != null && Object.hasOwnProperty.call(message, \"info\"))\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Leave message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Leave.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {centrifugal.centrifuge.protocol.ILeave} message Leave message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Leave.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Leave message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Leave} Leave\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Leave.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Leave();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.info = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Leave message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Leave} Leave\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Leave.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Leave message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Leave.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.info != null && message.hasOwnProperty(\"info\")) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.info);\n if (error)\n return \"info.\" + error;\n }\n return null;\n };\n\n /**\n * Gets the default type url for Leave\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Leave\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Leave.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Leave\";\n };\n\n return Leave;\n })();\n\n protocol.Unsubscribe = (function() {\n\n /**\n * Properties of an Unsubscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribe\n * @property {number|null} [code] Unsubscribe code\n * @property {string|null} [reason] Unsubscribe reason\n */\n\n /**\n * Constructs a new Unsubscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an Unsubscribe.\n * @implements IUnsubscribe\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe=} [properties] Properties to set\n */\n function Unsubscribe(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Unsubscribe code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @instance\n */\n Unsubscribe.prototype.code = 0;\n\n /**\n * Unsubscribe reason.\n * @member {string} reason\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @instance\n */\n Unsubscribe.prototype.reason = \"\";\n\n /**\n * Encodes the specified Unsubscribe message. Does not implicitly {@link centrifugal.centrifuge.protocol.Unsubscribe.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe} message Unsubscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Unsubscribe.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code);\n if (message.reason != null && Object.hasOwnProperty.call(message, \"reason\"))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason);\n return writer;\n };\n\n /**\n * Encodes the specified Unsubscribe message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Unsubscribe.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribe} message Unsubscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Unsubscribe.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Unsubscribe message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Unsubscribe} Unsubscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Unsubscribe.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Unsubscribe();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n message.code = reader.uint32();\n break;\n }\n case 3: {\n message.reason = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Unsubscribe message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Unsubscribe} Unsubscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Unsubscribe.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Unsubscribe message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Unsubscribe.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.reason != null && message.hasOwnProperty(\"reason\"))\n if (!$util.isString(message.reason))\n return \"reason: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Unsubscribe\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Unsubscribe\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Unsubscribe.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Unsubscribe\";\n };\n\n return Unsubscribe;\n })();\n\n protocol.Subscribe = (function() {\n\n /**\n * Properties of a Subscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribe\n * @property {boolean|null} [recoverable] Subscribe recoverable\n * @property {string|null} [epoch] Subscribe epoch\n * @property {number|Long|null} [offset] Subscribe offset\n * @property {boolean|null} [positioned] Subscribe positioned\n * @property {Uint8Array|null} [data] Subscribe data\n */\n\n /**\n * Constructs a new Subscribe.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Subscribe.\n * @implements ISubscribe\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribe=} [properties] Properties to set\n */\n function Subscribe(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Subscribe recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.recoverable = false;\n\n /**\n * Subscribe epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.epoch = \"\";\n\n /**\n * Subscribe offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Subscribe positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.positioned = false;\n\n /**\n * Subscribe data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @instance\n */\n Subscribe.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified Subscribe message. Does not implicitly {@link centrifugal.centrifuge.protocol.Subscribe.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribe} message Subscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Subscribe.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.recoverable);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.offset);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 6, wireType 0 =*/48).bool(message.positioned);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified Subscribe message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Subscribe.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribe} message Subscribe message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Subscribe.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Subscribe message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Subscribe} Subscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Subscribe.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Subscribe();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.recoverable = reader.bool();\n break;\n }\n case 4: {\n message.epoch = reader.string();\n break;\n }\n case 5: {\n message.offset = reader.uint64();\n break;\n }\n case 6: {\n message.positioned = reader.bool();\n break;\n }\n case 7: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Subscribe message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Subscribe} Subscribe\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Subscribe.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Subscribe message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Subscribe.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Subscribe\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Subscribe\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Subscribe.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Subscribe\";\n };\n\n return Subscribe;\n })();\n\n protocol.Message = (function() {\n\n /**\n * Properties of a Message.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IMessage\n * @property {Uint8Array|null} [data] Message data\n */\n\n /**\n * Constructs a new Message.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Message.\n * @implements IMessage\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IMessage=} [properties] Properties to set\n */\n function Message(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Message data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Message\n * @instance\n */\n Message.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified Message message. Does not implicitly {@link centrifugal.centrifuge.protocol.Message.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {centrifugal.centrifuge.protocol.IMessage} message Message message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Message.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified Message message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Message.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {centrifugal.centrifuge.protocol.IMessage} message Message message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Message.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Message message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Message} Message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Message.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Message();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Message message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Message} Message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Message.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Message message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Message.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Message\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Message\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Message\";\n };\n\n return Message;\n })();\n\n protocol.Connect = (function() {\n\n /**\n * Properties of a Connect.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnect\n * @property {string|null} [client] Connect client\n * @property {string|null} [version] Connect version\n * @property {Uint8Array|null} [data] Connect data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>|null} [subs] Connect subs\n * @property {boolean|null} [expires] Connect expires\n * @property {number|null} [ttl] Connect ttl\n * @property {number|null} [ping] Connect ping\n * @property {boolean|null} [pong] Connect pong\n * @property {string|null} [session] Connect session\n * @property {string|null} [node] Connect node\n * @property {number|Long|null} [time] Connect time\n */\n\n /**\n * Constructs a new Connect.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Connect.\n * @implements IConnect\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnect=} [properties] Properties to set\n */\n function Connect(properties) {\n this.subs = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Connect client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.client = \"\";\n\n /**\n * Connect version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.version = \"\";\n\n /**\n * Connect data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.data = $util.newBuffer([]);\n\n /**\n * Connect subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>} subs\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.subs = $util.emptyObject;\n\n /**\n * Connect expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.expires = false;\n\n /**\n * Connect ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.ttl = 0;\n\n /**\n * Connect ping.\n * @member {number} ping\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.ping = 0;\n\n /**\n * Connect pong.\n * @member {boolean} pong\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.pong = false;\n\n /**\n * Connect session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.session = \"\";\n\n /**\n * Connect node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.node = \"\";\n\n /**\n * Connect time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @instance\n */\n Connect.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Encodes the specified Connect message. Does not implicitly {@link centrifugal.centrifuge.protocol.Connect.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnect} message Connect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Connect.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 5, wireType 0 =*/40).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ttl);\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.ping);\n if (message.pong != null && Object.hasOwnProperty.call(message, \"pong\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.pong);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 9, wireType 2 =*/74).string(message.session);\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.node);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 11, wireType 0 =*/88).int64(message.time);\n return writer;\n };\n\n /**\n * Encodes the specified Connect message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Connect.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnect} message Connect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Connect.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Connect message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Connect} Connect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Connect.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Connect(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.data = reader.bytes();\n break;\n }\n case 4: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 5: {\n message.expires = reader.bool();\n break;\n }\n case 6: {\n message.ttl = reader.uint32();\n break;\n }\n case 7: {\n message.ping = reader.uint32();\n break;\n }\n case 8: {\n message.pong = reader.bool();\n break;\n }\n case 9: {\n message.session = reader.string();\n break;\n }\n case 10: {\n message.node = reader.string();\n break;\n }\n case 11: {\n message.time = reader.int64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Connect message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Connect} Connect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Connect.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Connect message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Connect.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.ping != null && message.hasOwnProperty(\"ping\"))\n if (!$util.isInteger(message.ping))\n return \"ping: integer expected\";\n if (message.pong != null && message.hasOwnProperty(\"pong\"))\n if (typeof message.pong !== \"boolean\")\n return \"pong: boolean expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Connect\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Connect\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Connect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Connect\";\n };\n\n return Connect;\n })();\n\n protocol.Disconnect = (function() {\n\n /**\n * Properties of a Disconnect.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IDisconnect\n * @property {number|null} [code] Disconnect code\n * @property {string|null} [reason] Disconnect reason\n * @property {boolean|null} [reconnect] Disconnect reconnect\n */\n\n /**\n * Constructs a new Disconnect.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Disconnect.\n * @implements IDisconnect\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IDisconnect=} [properties] Properties to set\n */\n function Disconnect(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Disconnect code.\n * @member {number} code\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.code = 0;\n\n /**\n * Disconnect reason.\n * @member {string} reason\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.reason = \"\";\n\n /**\n * Disconnect reconnect.\n * @member {boolean} reconnect\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @instance\n */\n Disconnect.prototype.reconnect = false;\n\n /**\n * Encodes the specified Disconnect message. Does not implicitly {@link centrifugal.centrifuge.protocol.Disconnect.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {centrifugal.centrifuge.protocol.IDisconnect} message Disconnect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Disconnect.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code);\n if (message.reason != null && Object.hasOwnProperty.call(message, \"reason\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason);\n if (message.reconnect != null && Object.hasOwnProperty.call(message, \"reconnect\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.reconnect);\n return writer;\n };\n\n /**\n * Encodes the specified Disconnect message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Disconnect.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {centrifugal.centrifuge.protocol.IDisconnect} message Disconnect message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Disconnect.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Disconnect message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Disconnect} Disconnect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Disconnect.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Disconnect();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.code = reader.uint32();\n break;\n }\n case 2: {\n message.reason = reader.string();\n break;\n }\n case 3: {\n message.reconnect = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Disconnect message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Disconnect} Disconnect\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Disconnect.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Disconnect message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Disconnect.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n if (!$util.isInteger(message.code))\n return \"code: integer expected\";\n if (message.reason != null && message.hasOwnProperty(\"reason\"))\n if (!$util.isString(message.reason))\n return \"reason: string expected\";\n if (message.reconnect != null && message.hasOwnProperty(\"reconnect\"))\n if (typeof message.reconnect !== \"boolean\")\n return \"reconnect: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Disconnect\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Disconnect\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Disconnect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Disconnect\";\n };\n\n return Disconnect;\n })();\n\n protocol.Refresh = (function() {\n\n /**\n * Properties of a Refresh.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefresh\n * @property {boolean|null} [expires] Refresh expires\n * @property {number|null} [ttl] Refresh ttl\n */\n\n /**\n * Constructs a new Refresh.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a Refresh.\n * @implements IRefresh\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefresh=} [properties] Properties to set\n */\n function Refresh(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Refresh expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @instance\n */\n Refresh.prototype.expires = false;\n\n /**\n * Refresh ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @instance\n */\n Refresh.prototype.ttl = 0;\n\n /**\n * Encodes the specified Refresh message. Does not implicitly {@link centrifugal.centrifuge.protocol.Refresh.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefresh} message Refresh message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Refresh.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified Refresh message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.Refresh.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefresh} message Refresh message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Refresh.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Refresh message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.Refresh} Refresh\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Refresh.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.Refresh();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Refresh message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.Refresh} Refresh\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Refresh.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Refresh message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Refresh.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for Refresh\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.Refresh\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Refresh.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.Refresh\";\n };\n\n return Refresh;\n })();\n\n protocol.ConnectRequest = (function() {\n\n /**\n * Properties of a ConnectRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnectRequest\n * @property {string|null} [token] ConnectRequest token\n * @property {Uint8Array|null} [data] ConnectRequest data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeRequest>|null} [subs] ConnectRequest subs\n * @property {string|null} [name] ConnectRequest name\n * @property {string|null} [version] ConnectRequest version\n * @property {Object.<string,string>|null} [headers] ConnectRequest headers\n */\n\n /**\n * Constructs a new ConnectRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ConnectRequest.\n * @implements IConnectRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnectRequest=} [properties] Properties to set\n */\n function ConnectRequest(properties) {\n this.subs = {};\n this.headers = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ConnectRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.token = \"\";\n\n /**\n * ConnectRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * ConnectRequest subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeRequest>} subs\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.subs = $util.emptyObject;\n\n /**\n * ConnectRequest name.\n * @member {string} name\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.name = \"\";\n\n /**\n * ConnectRequest version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.version = \"\";\n\n /**\n * ConnectRequest headers.\n * @member {Object.<string,string>} headers\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @instance\n */\n ConnectRequest.prototype.headers = $util.emptyObject;\n\n /**\n * Encodes the specified ConnectRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectRequest} message ConnectRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeRequest.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 5, wireType 2 =*/42).string(message.version);\n if (message.headers != null && Object.hasOwnProperty.call(message, \"headers\"))\n for (let keys = Object.keys(message.headers), i = 0; i < keys.length; ++i)\n writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified ConnectRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectRequest} message ConnectRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ConnectRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ConnectRequest} ConnectRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ConnectRequest(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.token = reader.string();\n break;\n }\n case 2: {\n message.data = reader.bytes();\n break;\n }\n case 3: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeRequest.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 4: {\n message.name = reader.string();\n break;\n }\n case 5: {\n message.version = reader.string();\n break;\n }\n case 6: {\n if (message.headers === $util.emptyObject)\n message.headers = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = \"\";\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = reader.string();\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.headers[key] = value;\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ConnectRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ConnectRequest} ConnectRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ConnectRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ConnectRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeRequest.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.headers != null && message.hasOwnProperty(\"headers\")) {\n if (!$util.isObject(message.headers))\n return \"headers: object expected\";\n let key = Object.keys(message.headers);\n for (let i = 0; i < key.length; ++i)\n if (!$util.isString(message.headers[key[i]]))\n return \"headers: string{k:string} expected\";\n }\n return null;\n };\n\n /**\n * Gets the default type url for ConnectRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ConnectRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ConnectRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ConnectRequest\";\n };\n\n return ConnectRequest;\n })();\n\n protocol.ConnectResult = (function() {\n\n /**\n * Properties of a ConnectResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IConnectResult\n * @property {string|null} [client] ConnectResult client\n * @property {string|null} [version] ConnectResult version\n * @property {boolean|null} [expires] ConnectResult expires\n * @property {number|null} [ttl] ConnectResult ttl\n * @property {Uint8Array|null} [data] ConnectResult data\n * @property {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>|null} [subs] ConnectResult subs\n * @property {number|null} [ping] ConnectResult ping\n * @property {boolean|null} [pong] ConnectResult pong\n * @property {string|null} [session] ConnectResult session\n * @property {string|null} [node] ConnectResult node\n * @property {number|Long|null} [time] ConnectResult time\n */\n\n /**\n * Constructs a new ConnectResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a ConnectResult.\n * @implements IConnectResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IConnectResult=} [properties] Properties to set\n */\n function ConnectResult(properties) {\n this.subs = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ConnectResult client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.client = \"\";\n\n /**\n * ConnectResult version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.version = \"\";\n\n /**\n * ConnectResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.expires = false;\n\n /**\n * ConnectResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.ttl = 0;\n\n /**\n * ConnectResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.data = $util.newBuffer([]);\n\n /**\n * ConnectResult subs.\n * @member {Object.<string,centrifugal.centrifuge.protocol.ISubscribeResult>} subs\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.subs = $util.emptyObject;\n\n /**\n * ConnectResult ping.\n * @member {number} ping\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.ping = 0;\n\n /**\n * ConnectResult pong.\n * @member {boolean} pong\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.pong = false;\n\n /**\n * ConnectResult session.\n * @member {string} session\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.session = \"\";\n\n /**\n * ConnectResult node.\n * @member {string} node\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.node = \"\";\n\n /**\n * ConnectResult time.\n * @member {number|Long} time\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @instance\n */\n ConnectResult.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;\n\n /**\n * Encodes the specified ConnectResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectResult} message ConnectResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ttl);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data);\n if (message.subs != null && Object.hasOwnProperty.call(message, \"subs\"))\n for (let keys = Object.keys(message.subs), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.SubscribeResult.encode(message.subs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n if (message.ping != null && Object.hasOwnProperty.call(message, \"ping\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.ping);\n if (message.pong != null && Object.hasOwnProperty.call(message, \"pong\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.pong);\n if (message.session != null && Object.hasOwnProperty.call(message, \"session\"))\n writer.uint32(/* id 9, wireType 2 =*/74).string(message.session);\n if (message.node != null && Object.hasOwnProperty.call(message, \"node\"))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.node);\n if (message.time != null && Object.hasOwnProperty.call(message, \"time\"))\n writer.uint32(/* id 11, wireType 0 =*/88).int64(message.time);\n return writer;\n };\n\n /**\n * Encodes the specified ConnectResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.ConnectResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IConnectResult} message ConnectResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ConnectResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ConnectResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.ConnectResult} ConnectResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.ConnectResult(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.expires = reader.bool();\n break;\n }\n case 4: {\n message.ttl = reader.uint32();\n break;\n }\n case 5: {\n message.data = reader.bytes();\n break;\n }\n case 6: {\n if (message.subs === $util.emptyObject)\n message.subs = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.SubscribeResult.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.subs[key] = value;\n break;\n }\n case 7: {\n message.ping = reader.uint32();\n break;\n }\n case 8: {\n message.pong = reader.bool();\n break;\n }\n case 9: {\n message.session = reader.string();\n break;\n }\n case 10: {\n message.node = reader.string();\n break;\n }\n case 11: {\n message.time = reader.int64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ConnectResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.ConnectResult} ConnectResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ConnectResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ConnectResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ConnectResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.subs != null && message.hasOwnProperty(\"subs\")) {\n if (!$util.isObject(message.subs))\n return \"subs: object expected\";\n let key = Object.keys(message.subs);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.SubscribeResult.verify(message.subs[key[i]]);\n if (error)\n return \"subs.\" + error;\n }\n }\n if (message.ping != null && message.hasOwnProperty(\"ping\"))\n if (!$util.isInteger(message.ping))\n return \"ping: integer expected\";\n if (message.pong != null && message.hasOwnProperty(\"pong\"))\n if (typeof message.pong !== \"boolean\")\n return \"pong: boolean expected\";\n if (message.session != null && message.hasOwnProperty(\"session\"))\n if (!$util.isString(message.session))\n return \"session: string expected\";\n if (message.node != null && message.hasOwnProperty(\"node\"))\n if (!$util.isString(message.node))\n return \"node: string expected\";\n if (message.time != null && message.hasOwnProperty(\"time\"))\n if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))\n return \"time: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for ConnectResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.ConnectResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ConnectResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.ConnectResult\";\n };\n\n return ConnectResult;\n })();\n\n protocol.RefreshRequest = (function() {\n\n /**\n * Properties of a RefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefreshRequest\n * @property {string|null} [token] RefreshRequest token\n */\n\n /**\n * Constructs a new RefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RefreshRequest.\n * @implements IRefreshRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest=} [properties] Properties to set\n */\n function RefreshRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RefreshRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @instance\n */\n RefreshRequest.prototype.token = \"\";\n\n /**\n * Encodes the specified RefreshRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest} message RefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);\n return writer;\n };\n\n /**\n * Encodes the specified RefreshRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshRequest} message RefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RefreshRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RefreshRequest} RefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RefreshRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.token = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RefreshRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RefreshRequest} RefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RefreshRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RefreshRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RefreshRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RefreshRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RefreshRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RefreshRequest\";\n };\n\n return RefreshRequest;\n })();\n\n protocol.RefreshResult = (function() {\n\n /**\n * Properties of a RefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRefreshResult\n * @property {string|null} [client] RefreshResult client\n * @property {string|null} [version] RefreshResult version\n * @property {boolean|null} [expires] RefreshResult expires\n * @property {number|null} [ttl] RefreshResult ttl\n */\n\n /**\n * Constructs a new RefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RefreshResult.\n * @implements IRefreshResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRefreshResult=} [properties] Properties to set\n */\n function RefreshResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RefreshResult client.\n * @member {string} client\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.client = \"\";\n\n /**\n * RefreshResult version.\n * @member {string} version\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.version = \"\";\n\n /**\n * RefreshResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.expires = false;\n\n /**\n * RefreshResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @instance\n */\n RefreshResult.prototype.ttl = 0;\n\n /**\n * Encodes the specified RefreshResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshResult} message RefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.client != null && Object.hasOwnProperty.call(message, \"client\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.client);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified RefreshResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RefreshResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRefreshResult} message RefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RefreshResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RefreshResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RefreshResult} RefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RefreshResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.client = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n message.expires = reader.bool();\n break;\n }\n case 4: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RefreshResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RefreshResult} RefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RefreshResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RefreshResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RefreshResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.client != null && message.hasOwnProperty(\"client\"))\n if (!$util.isString(message.client))\n return \"client: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RefreshResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RefreshResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RefreshResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RefreshResult\";\n };\n\n return RefreshResult;\n })();\n\n protocol.SubscribeRequest = (function() {\n\n /**\n * Properties of a SubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribeRequest\n * @property {string|null} [channel] SubscribeRequest channel\n * @property {string|null} [token] SubscribeRequest token\n * @property {boolean|null} [recover] SubscribeRequest recover\n * @property {string|null} [epoch] SubscribeRequest epoch\n * @property {number|Long|null} [offset] SubscribeRequest offset\n * @property {Uint8Array|null} [data] SubscribeRequest data\n * @property {boolean|null} [positioned] SubscribeRequest positioned\n * @property {boolean|null} [recoverable] SubscribeRequest recoverable\n * @property {boolean|null} [join_leave] SubscribeRequest join_leave\n * @property {string|null} [delta] SubscribeRequest delta\n */\n\n /**\n * Constructs a new SubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubscribeRequest.\n * @implements ISubscribeRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest=} [properties] Properties to set\n */\n function SubscribeRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubscribeRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.channel = \"\";\n\n /**\n * SubscribeRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.token = \"\";\n\n /**\n * SubscribeRequest recover.\n * @member {boolean} recover\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.recover = false;\n\n /**\n * SubscribeRequest epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.epoch = \"\";\n\n /**\n * SubscribeRequest offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * SubscribeRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * SubscribeRequest positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.positioned = false;\n\n /**\n * SubscribeRequest recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.recoverable = false;\n\n /**\n * SubscribeRequest join_leave.\n * @member {boolean} join_leave\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.join_leave = false;\n\n /**\n * SubscribeRequest delta.\n * @member {string} delta\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @instance\n */\n SubscribeRequest.prototype.delta = \"\";\n\n /**\n * Encodes the specified SubscribeRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest} message SubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);\n if (message.recover != null && Object.hasOwnProperty.call(message, \"recover\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recover);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.offset);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.data);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 9, wireType 0 =*/72).bool(message.positioned);\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.recoverable);\n if (message.join_leave != null && Object.hasOwnProperty.call(message, \"join_leave\"))\n writer.uint32(/* id 11, wireType 0 =*/88).bool(message.join_leave);\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 12, wireType 2 =*/98).string(message.delta);\n return writer;\n };\n\n /**\n * Encodes the specified SubscribeRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeRequest} message SubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubscribeRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubscribeRequest} SubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubscribeRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.token = reader.string();\n break;\n }\n case 3: {\n message.recover = reader.bool();\n break;\n }\n case 6: {\n message.epoch = reader.string();\n break;\n }\n case 7: {\n message.offset = reader.uint64();\n break;\n }\n case 8: {\n message.data = reader.bytes();\n break;\n }\n case 9: {\n message.positioned = reader.bool();\n break;\n }\n case 10: {\n message.recoverable = reader.bool();\n break;\n }\n case 11: {\n message.join_leave = reader.bool();\n break;\n }\n case 12: {\n message.delta = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubscribeRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubscribeRequest} SubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubscribeRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubscribeRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n if (message.recover != null && message.hasOwnProperty(\"recover\"))\n if (typeof message.recover !== \"boolean\")\n return \"recover: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.join_leave != null && message.hasOwnProperty(\"join_leave\"))\n if (typeof message.join_leave !== \"boolean\")\n return \"join_leave: boolean expected\";\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (!$util.isString(message.delta))\n return \"delta: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubscribeRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubscribeRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubscribeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubscribeRequest\";\n };\n\n return SubscribeRequest;\n })();\n\n protocol.SubscribeResult = (function() {\n\n /**\n * Properties of a SubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubscribeResult\n * @property {boolean|null} [expires] SubscribeResult expires\n * @property {number|null} [ttl] SubscribeResult ttl\n * @property {boolean|null} [recoverable] SubscribeResult recoverable\n * @property {string|null} [epoch] SubscribeResult epoch\n * @property {Array.<centrifugal.centrifuge.protocol.IPublication>|null} [publications] SubscribeResult publications\n * @property {boolean|null} [recovered] SubscribeResult recovered\n * @property {number|Long|null} [offset] SubscribeResult offset\n * @property {boolean|null} [positioned] SubscribeResult positioned\n * @property {Uint8Array|null} [data] SubscribeResult data\n * @property {boolean|null} [was_recovering] SubscribeResult was_recovering\n * @property {boolean|null} [delta] SubscribeResult delta\n */\n\n /**\n * Constructs a new SubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubscribeResult.\n * @implements ISubscribeResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult=} [properties] Properties to set\n */\n function SubscribeResult(properties) {\n this.publications = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubscribeResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.expires = false;\n\n /**\n * SubscribeResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.ttl = 0;\n\n /**\n * SubscribeResult recoverable.\n * @member {boolean} recoverable\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.recoverable = false;\n\n /**\n * SubscribeResult epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.epoch = \"\";\n\n /**\n * SubscribeResult publications.\n * @member {Array.<centrifugal.centrifuge.protocol.IPublication>} publications\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.publications = $util.emptyArray;\n\n /**\n * SubscribeResult recovered.\n * @member {boolean} recovered\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.recovered = false;\n\n /**\n * SubscribeResult offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * SubscribeResult positioned.\n * @member {boolean} positioned\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.positioned = false;\n\n /**\n * SubscribeResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.data = $util.newBuffer([]);\n\n /**\n * SubscribeResult was_recovering.\n * @member {boolean} was_recovering\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.was_recovering = false;\n\n /**\n * SubscribeResult delta.\n * @member {boolean} delta\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @instance\n */\n SubscribeResult.prototype.delta = false;\n\n /**\n * Encodes the specified SubscribeResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult} message SubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n if (message.recoverable != null && Object.hasOwnProperty.call(message, \"recoverable\"))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recoverable);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.epoch);\n if (message.publications != null && message.publications.length)\n for (let i = 0; i < message.publications.length; ++i)\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.publications[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.recovered != null && Object.hasOwnProperty.call(message, \"recovered\"))\n writer.uint32(/* id 8, wireType 0 =*/64).bool(message.recovered);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.offset);\n if (message.positioned != null && Object.hasOwnProperty.call(message, \"positioned\"))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.positioned);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.data);\n if (message.was_recovering != null && Object.hasOwnProperty.call(message, \"was_recovering\"))\n writer.uint32(/* id 12, wireType 0 =*/96).bool(message.was_recovering);\n if (message.delta != null && Object.hasOwnProperty.call(message, \"delta\"))\n writer.uint32(/* id 13, wireType 0 =*/104).bool(message.delta);\n return writer;\n };\n\n /**\n * Encodes the specified SubscribeResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubscribeResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubscribeResult} message SubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubscribeResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubscribeResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubscribeResult} SubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubscribeResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n case 3: {\n message.recoverable = reader.bool();\n break;\n }\n case 6: {\n message.epoch = reader.string();\n break;\n }\n case 7: {\n if (!(message.publications && message.publications.length))\n message.publications = [];\n message.publications.push($root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32()));\n break;\n }\n case 8: {\n message.recovered = reader.bool();\n break;\n }\n case 9: {\n message.offset = reader.uint64();\n break;\n }\n case 10: {\n message.positioned = reader.bool();\n break;\n }\n case 11: {\n message.data = reader.bytes();\n break;\n }\n case 12: {\n message.was_recovering = reader.bool();\n break;\n }\n case 13: {\n message.delta = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubscribeResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubscribeResult} SubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubscribeResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubscribeResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubscribeResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n if (message.recoverable != null && message.hasOwnProperty(\"recoverable\"))\n if (typeof message.recoverable !== \"boolean\")\n return \"recoverable: boolean expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.publications != null && message.hasOwnProperty(\"publications\")) {\n if (!Array.isArray(message.publications))\n return \"publications: array expected\";\n for (let i = 0; i < message.publications.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.publications[i]);\n if (error)\n return \"publications.\" + error;\n }\n }\n if (message.recovered != null && message.hasOwnProperty(\"recovered\"))\n if (typeof message.recovered !== \"boolean\")\n return \"recovered: boolean expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.positioned != null && message.hasOwnProperty(\"positioned\"))\n if (typeof message.positioned !== \"boolean\")\n return \"positioned: boolean expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.was_recovering != null && message.hasOwnProperty(\"was_recovering\"))\n if (typeof message.was_recovering !== \"boolean\")\n return \"was_recovering: boolean expected\";\n if (message.delta != null && message.hasOwnProperty(\"delta\"))\n if (typeof message.delta !== \"boolean\")\n return \"delta: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubscribeResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubscribeResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubscribeResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubscribeResult\";\n };\n\n return SubscribeResult;\n })();\n\n protocol.SubRefreshRequest = (function() {\n\n /**\n * Properties of a SubRefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubRefreshRequest\n * @property {string|null} [channel] SubRefreshRequest channel\n * @property {string|null} [token] SubRefreshRequest token\n */\n\n /**\n * Constructs a new SubRefreshRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubRefreshRequest.\n * @implements ISubRefreshRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest=} [properties] Properties to set\n */\n function SubRefreshRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubRefreshRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @instance\n */\n SubRefreshRequest.prototype.channel = \"\";\n\n /**\n * SubRefreshRequest token.\n * @member {string} token\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @instance\n */\n SubRefreshRequest.prototype.token = \"\";\n\n /**\n * Encodes the specified SubRefreshRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest} message SubRefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.token != null && Object.hasOwnProperty.call(message, \"token\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);\n return writer;\n };\n\n /**\n * Encodes the specified SubRefreshRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshRequest} message SubRefreshRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubRefreshRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubRefreshRequest} SubRefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubRefreshRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.token = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubRefreshRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubRefreshRequest} SubRefreshRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubRefreshRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubRefreshRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.token != null && message.hasOwnProperty(\"token\"))\n if (!$util.isString(message.token))\n return \"token: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubRefreshRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubRefreshRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubRefreshRequest\";\n };\n\n return SubRefreshRequest;\n })();\n\n protocol.SubRefreshResult = (function() {\n\n /**\n * Properties of a SubRefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISubRefreshResult\n * @property {boolean|null} [expires] SubRefreshResult expires\n * @property {number|null} [ttl] SubRefreshResult ttl\n */\n\n /**\n * Constructs a new SubRefreshResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SubRefreshResult.\n * @implements ISubRefreshResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult=} [properties] Properties to set\n */\n function SubRefreshResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SubRefreshResult expires.\n * @member {boolean} expires\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @instance\n */\n SubRefreshResult.prototype.expires = false;\n\n /**\n * SubRefreshResult ttl.\n * @member {number} ttl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @instance\n */\n SubRefreshResult.prototype.ttl = 0;\n\n /**\n * Encodes the specified SubRefreshResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult} message SubRefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.expires != null && Object.hasOwnProperty.call(message, \"expires\"))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.expires);\n if (message.ttl != null && Object.hasOwnProperty.call(message, \"ttl\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ttl);\n return writer;\n };\n\n /**\n * Encodes the specified SubRefreshResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SubRefreshResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {centrifugal.centrifuge.protocol.ISubRefreshResult} message SubRefreshResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SubRefreshResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SubRefreshResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SubRefreshResult} SubRefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SubRefreshResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.expires = reader.bool();\n break;\n }\n case 2: {\n message.ttl = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SubRefreshResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SubRefreshResult} SubRefreshResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SubRefreshResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SubRefreshResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SubRefreshResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.expires != null && message.hasOwnProperty(\"expires\"))\n if (typeof message.expires !== \"boolean\")\n return \"expires: boolean expected\";\n if (message.ttl != null && message.hasOwnProperty(\"ttl\"))\n if (!$util.isInteger(message.ttl))\n return \"ttl: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SubRefreshResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SubRefreshResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SubRefreshResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SubRefreshResult\";\n };\n\n return SubRefreshResult;\n })();\n\n protocol.UnsubscribeRequest = (function() {\n\n /**\n * Properties of an UnsubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribeRequest\n * @property {string|null} [channel] UnsubscribeRequest channel\n */\n\n /**\n * Constructs a new UnsubscribeRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an UnsubscribeRequest.\n * @implements IUnsubscribeRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest=} [properties] Properties to set\n */\n function UnsubscribeRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * UnsubscribeRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @instance\n */\n UnsubscribeRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified UnsubscribeRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest} message UnsubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified UnsubscribeRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeRequest} message UnsubscribeRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UnsubscribeRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeRequest} UnsubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.UnsubscribeRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an UnsubscribeRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeRequest} UnsubscribeRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an UnsubscribeRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UnsubscribeRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for UnsubscribeRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n UnsubscribeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.UnsubscribeRequest\";\n };\n\n return UnsubscribeRequest;\n })();\n\n protocol.UnsubscribeResult = (function() {\n\n /**\n * Properties of an UnsubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IUnsubscribeResult\n */\n\n /**\n * Constructs a new UnsubscribeResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents an UnsubscribeResult.\n * @implements IUnsubscribeResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult=} [properties] Properties to set\n */\n function UnsubscribeResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified UnsubscribeResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult} message UnsubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified UnsubscribeResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.UnsubscribeResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IUnsubscribeResult} message UnsubscribeResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UnsubscribeResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UnsubscribeResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeResult} UnsubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.UnsubscribeResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an UnsubscribeResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.UnsubscribeResult} UnsubscribeResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UnsubscribeResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an UnsubscribeResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UnsubscribeResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for UnsubscribeResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.UnsubscribeResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n UnsubscribeResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.UnsubscribeResult\";\n };\n\n return UnsubscribeResult;\n })();\n\n protocol.PublishRequest = (function() {\n\n /**\n * Properties of a PublishRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublishRequest\n * @property {string|null} [channel] PublishRequest channel\n * @property {Uint8Array|null} [data] PublishRequest data\n */\n\n /**\n * Constructs a new PublishRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PublishRequest.\n * @implements IPublishRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublishRequest=} [properties] Properties to set\n */\n function PublishRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PublishRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @instance\n */\n PublishRequest.prototype.channel = \"\";\n\n /**\n * PublishRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @instance\n */\n PublishRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified PublishRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishRequest} message PublishRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishRequest} message PublishRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PublishRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PublishRequest} PublishRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PublishRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 2: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PublishRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PublishRequest} PublishRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PublishRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PublishRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PublishRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PublishRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PublishRequest\";\n };\n\n return PublishRequest;\n })();\n\n protocol.PublishResult = (function() {\n\n /**\n * Properties of a PublishResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPublishResult\n */\n\n /**\n * Constructs a new PublishResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PublishResult.\n * @implements IPublishResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPublishResult=} [properties] Properties to set\n */\n function PublishResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PublishResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishResult} message PublishResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PublishResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PublishResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPublishResult} message PublishResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PublishResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PublishResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PublishResult} PublishResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PublishResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PublishResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PublishResult} PublishResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PublishResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PublishResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PublishResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PublishResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PublishResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PublishResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PublishResult\";\n };\n\n return PublishResult;\n })();\n\n protocol.PresenceRequest = (function() {\n\n /**\n * Properties of a PresenceRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceRequest\n * @property {string|null} [channel] PresenceRequest channel\n */\n\n /**\n * Constructs a new PresenceRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceRequest.\n * @implements IPresenceRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest=} [properties] Properties to set\n */\n function PresenceRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @instance\n */\n PresenceRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified PresenceRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest} message PresenceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceRequest} message PresenceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceRequest} PresenceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceRequest} PresenceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceRequest\";\n };\n\n return PresenceRequest;\n })();\n\n protocol.PresenceResult = (function() {\n\n /**\n * Properties of a PresenceResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceResult\n * @property {Object.<string,centrifugal.centrifuge.protocol.IClientInfo>|null} [presence] PresenceResult presence\n */\n\n /**\n * Constructs a new PresenceResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceResult.\n * @implements IPresenceResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceResult=} [properties] Properties to set\n */\n function PresenceResult(properties) {\n this.presence = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceResult presence.\n * @member {Object.<string,centrifugal.centrifuge.protocol.IClientInfo>} presence\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @instance\n */\n PresenceResult.prototype.presence = $util.emptyObject;\n\n /**\n * Encodes the specified PresenceResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceResult} message PresenceResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.presence != null && Object.hasOwnProperty.call(message, \"presence\"))\n for (let keys = Object.keys(message.presence), i = 0; i < keys.length; ++i) {\n writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);\n $root.centrifugal.centrifuge.protocol.ClientInfo.encode(message.presence[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();\n }\n return writer;\n };\n\n /**\n * Encodes the specified PresenceResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceResult} message PresenceResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceResult} PresenceResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceResult(), key, value;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (message.presence === $util.emptyObject)\n message.presence = {};\n let end2 = reader.uint32() + reader.pos;\n key = \"\";\n value = null;\n while (reader.pos < end2) {\n let tag2 = reader.uint32();\n switch (tag2 >>> 3) {\n case 1:\n key = reader.string();\n break;\n case 2:\n value = $root.centrifugal.centrifuge.protocol.ClientInfo.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag2 & 7);\n break;\n }\n }\n message.presence[key] = value;\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceResult} PresenceResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.presence != null && message.hasOwnProperty(\"presence\")) {\n if (!$util.isObject(message.presence))\n return \"presence: object expected\";\n let key = Object.keys(message.presence);\n for (let i = 0; i < key.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.ClientInfo.verify(message.presence[key[i]]);\n if (error)\n return \"presence.\" + error;\n }\n }\n return null;\n };\n\n /**\n * Gets the default type url for PresenceResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceResult\";\n };\n\n return PresenceResult;\n })();\n\n protocol.PresenceStatsRequest = (function() {\n\n /**\n * Properties of a PresenceStatsRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceStatsRequest\n * @property {string|null} [channel] PresenceStatsRequest channel\n */\n\n /**\n * Constructs a new PresenceStatsRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceStatsRequest.\n * @implements IPresenceStatsRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest=} [properties] Properties to set\n */\n function PresenceStatsRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceStatsRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @instance\n */\n PresenceStatsRequest.prototype.channel = \"\";\n\n /**\n * Encodes the specified PresenceStatsRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest} message PresenceStatsRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceStatsRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsRequest} message PresenceStatsRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceStatsRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsRequest} PresenceStatsRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceStatsRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceStatsRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsRequest} PresenceStatsRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceStatsRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceStatsRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceStatsRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceStatsRequest\";\n };\n\n return PresenceStatsRequest;\n })();\n\n protocol.PresenceStatsResult = (function() {\n\n /**\n * Properties of a PresenceStatsResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPresenceStatsResult\n * @property {number|null} [num_clients] PresenceStatsResult num_clients\n * @property {number|null} [num_users] PresenceStatsResult num_users\n */\n\n /**\n * Constructs a new PresenceStatsResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PresenceStatsResult.\n * @implements IPresenceStatsResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult=} [properties] Properties to set\n */\n function PresenceStatsResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * PresenceStatsResult num_clients.\n * @member {number} num_clients\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @instance\n */\n PresenceStatsResult.prototype.num_clients = 0;\n\n /**\n * PresenceStatsResult num_users.\n * @member {number} num_users\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @instance\n */\n PresenceStatsResult.prototype.num_users = 0;\n\n /**\n * Encodes the specified PresenceStatsResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult} message PresenceStatsResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.num_clients != null && Object.hasOwnProperty.call(message, \"num_clients\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.num_clients);\n if (message.num_users != null && Object.hasOwnProperty.call(message, \"num_users\"))\n writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_users);\n return writer;\n };\n\n /**\n * Encodes the specified PresenceStatsResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PresenceStatsResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPresenceStatsResult} message PresenceStatsResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PresenceStatsResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PresenceStatsResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsResult} PresenceStatsResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PresenceStatsResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.num_clients = reader.uint32();\n break;\n }\n case 2: {\n message.num_users = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PresenceStatsResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PresenceStatsResult} PresenceStatsResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PresenceStatsResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PresenceStatsResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PresenceStatsResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.num_clients != null && message.hasOwnProperty(\"num_clients\"))\n if (!$util.isInteger(message.num_clients))\n return \"num_clients: integer expected\";\n if (message.num_users != null && message.hasOwnProperty(\"num_users\"))\n if (!$util.isInteger(message.num_users))\n return \"num_users: integer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PresenceStatsResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PresenceStatsResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PresenceStatsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PresenceStatsResult\";\n };\n\n return PresenceStatsResult;\n })();\n\n protocol.StreamPosition = (function() {\n\n /**\n * Properties of a StreamPosition.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IStreamPosition\n * @property {number|Long|null} [offset] StreamPosition offset\n * @property {string|null} [epoch] StreamPosition epoch\n */\n\n /**\n * Constructs a new StreamPosition.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a StreamPosition.\n * @implements IStreamPosition\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IStreamPosition=} [properties] Properties to set\n */\n function StreamPosition(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * StreamPosition offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @instance\n */\n StreamPosition.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * StreamPosition epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @instance\n */\n StreamPosition.prototype.epoch = \"\";\n\n /**\n * Encodes the specified StreamPosition message. Does not implicitly {@link centrifugal.centrifuge.protocol.StreamPosition.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {centrifugal.centrifuge.protocol.IStreamPosition} message StreamPosition message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StreamPosition.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.offset);\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.epoch);\n return writer;\n };\n\n /**\n * Encodes the specified StreamPosition message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.StreamPosition.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {centrifugal.centrifuge.protocol.IStreamPosition} message StreamPosition message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n StreamPosition.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a StreamPosition message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.StreamPosition} StreamPosition\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StreamPosition.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.StreamPosition();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.offset = reader.uint64();\n break;\n }\n case 2: {\n message.epoch = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a StreamPosition message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.StreamPosition} StreamPosition\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n StreamPosition.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a StreamPosition message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n StreamPosition.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for StreamPosition\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.StreamPosition\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n StreamPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.StreamPosition\";\n };\n\n return StreamPosition;\n })();\n\n protocol.HistoryRequest = (function() {\n\n /**\n * Properties of a HistoryRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IHistoryRequest\n * @property {string|null} [channel] HistoryRequest channel\n * @property {number|null} [limit] HistoryRequest limit\n * @property {centrifugal.centrifuge.protocol.IStreamPosition|null} [since] HistoryRequest since\n * @property {boolean|null} [reverse] HistoryRequest reverse\n */\n\n /**\n * Constructs a new HistoryRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a HistoryRequest.\n * @implements IHistoryRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest=} [properties] Properties to set\n */\n function HistoryRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * HistoryRequest channel.\n * @member {string} channel\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.channel = \"\";\n\n /**\n * HistoryRequest limit.\n * @member {number} limit\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.limit = 0;\n\n /**\n * HistoryRequest since.\n * @member {centrifugal.centrifuge.protocol.IStreamPosition|null|undefined} since\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.since = null;\n\n /**\n * HistoryRequest reverse.\n * @member {boolean} reverse\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @instance\n */\n HistoryRequest.prototype.reverse = false;\n\n /**\n * Encodes the specified HistoryRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest} message HistoryRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.channel != null && Object.hasOwnProperty.call(message, \"channel\"))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel);\n if (message.limit != null && Object.hasOwnProperty.call(message, \"limit\"))\n writer.uint32(/* id 7, wireType 0 =*/56).int32(message.limit);\n if (message.since != null && Object.hasOwnProperty.call(message, \"since\"))\n $root.centrifugal.centrifuge.protocol.StreamPosition.encode(message.since, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.reverse != null && Object.hasOwnProperty.call(message, \"reverse\"))\n writer.uint32(/* id 9, wireType 0 =*/72).bool(message.reverse);\n return writer;\n };\n\n /**\n * Encodes the specified HistoryRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryRequest} message HistoryRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HistoryRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.HistoryRequest} HistoryRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.HistoryRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.channel = reader.string();\n break;\n }\n case 7: {\n message.limit = reader.int32();\n break;\n }\n case 8: {\n message.since = $root.centrifugal.centrifuge.protocol.StreamPosition.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.reverse = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a HistoryRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.HistoryRequest} HistoryRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a HistoryRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HistoryRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.channel != null && message.hasOwnProperty(\"channel\"))\n if (!$util.isString(message.channel))\n return \"channel: string expected\";\n if (message.limit != null && message.hasOwnProperty(\"limit\"))\n if (!$util.isInteger(message.limit))\n return \"limit: integer expected\";\n if (message.since != null && message.hasOwnProperty(\"since\")) {\n let error = $root.centrifugal.centrifuge.protocol.StreamPosition.verify(message.since);\n if (error)\n return \"since.\" + error;\n }\n if (message.reverse != null && message.hasOwnProperty(\"reverse\"))\n if (typeof message.reverse !== \"boolean\")\n return \"reverse: boolean expected\";\n return null;\n };\n\n /**\n * Gets the default type url for HistoryRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.HistoryRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n HistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.HistoryRequest\";\n };\n\n return HistoryRequest;\n })();\n\n protocol.HistoryResult = (function() {\n\n /**\n * Properties of a HistoryResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IHistoryResult\n * @property {Array.<centrifugal.centrifuge.protocol.IPublication>|null} [publications] HistoryResult publications\n * @property {string|null} [epoch] HistoryResult epoch\n * @property {number|Long|null} [offset] HistoryResult offset\n */\n\n /**\n * Constructs a new HistoryResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a HistoryResult.\n * @implements IHistoryResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IHistoryResult=} [properties] Properties to set\n */\n function HistoryResult(properties) {\n this.publications = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * HistoryResult publications.\n * @member {Array.<centrifugal.centrifuge.protocol.IPublication>} publications\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.publications = $util.emptyArray;\n\n /**\n * HistoryResult epoch.\n * @member {string} epoch\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.epoch = \"\";\n\n /**\n * HistoryResult offset.\n * @member {number|Long} offset\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @instance\n */\n HistoryResult.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;\n\n /**\n * Encodes the specified HistoryResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryResult} message HistoryResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.publications != null && message.publications.length)\n for (let i = 0; i < message.publications.length; ++i)\n $root.centrifugal.centrifuge.protocol.Publication.encode(message.publications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.epoch != null && Object.hasOwnProperty.call(message, \"epoch\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.epoch);\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.offset);\n return writer;\n };\n\n /**\n * Encodes the specified HistoryResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.HistoryResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IHistoryResult} message HistoryResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistoryResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HistoryResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.HistoryResult} HistoryResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.HistoryResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.publications && message.publications.length))\n message.publications = [];\n message.publications.push($root.centrifugal.centrifuge.protocol.Publication.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.epoch = reader.string();\n break;\n }\n case 3: {\n message.offset = reader.uint64();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a HistoryResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.HistoryResult} HistoryResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistoryResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a HistoryResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HistoryResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.publications != null && message.hasOwnProperty(\"publications\")) {\n if (!Array.isArray(message.publications))\n return \"publications: array expected\";\n for (let i = 0; i < message.publications.length; ++i) {\n let error = $root.centrifugal.centrifuge.protocol.Publication.verify(message.publications[i]);\n if (error)\n return \"publications.\" + error;\n }\n }\n if (message.epoch != null && message.hasOwnProperty(\"epoch\"))\n if (!$util.isString(message.epoch))\n return \"epoch: string expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))\n return \"offset: integer|Long expected\";\n return null;\n };\n\n /**\n * Gets the default type url for HistoryResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.HistoryResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n HistoryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.HistoryResult\";\n };\n\n return HistoryResult;\n })();\n\n protocol.PingRequest = (function() {\n\n /**\n * Properties of a PingRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPingRequest\n */\n\n /**\n * Constructs a new PingRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PingRequest.\n * @implements IPingRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPingRequest=} [properties] Properties to set\n */\n function PingRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PingRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.PingRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingRequest} message PingRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PingRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingRequest} message PingRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PingRequest} PingRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PingRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PingRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PingRequest} PingRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PingRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PingRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PingRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PingRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PingRequest\";\n };\n\n return PingRequest;\n })();\n\n protocol.PingResult = (function() {\n\n /**\n * Properties of a PingResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IPingResult\n */\n\n /**\n * Constructs a new PingResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a PingResult.\n * @implements IPingResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IPingResult=} [properties] Properties to set\n */\n function PingResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Encodes the specified PingResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.PingResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingResult} message PingResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n return writer;\n };\n\n /**\n * Encodes the specified PingResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.PingResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IPingResult} message PingResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.PingResult} PingResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.PingResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a PingResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.PingResult} PingResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a PingResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n PingResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n return null;\n };\n\n /**\n * Gets the default type url for PingResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.PingResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n PingResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.PingResult\";\n };\n\n return PingResult;\n })();\n\n protocol.RPCRequest = (function() {\n\n /**\n * Properties of a RPCRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRPCRequest\n * @property {Uint8Array|null} [data] RPCRequest data\n * @property {string|null} [method] RPCRequest method\n */\n\n /**\n * Constructs a new RPCRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RPCRequest.\n * @implements IRPCRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRPCRequest=} [properties] Properties to set\n */\n function RPCRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RPCRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @instance\n */\n RPCRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * RPCRequest method.\n * @member {string} method\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @instance\n */\n RPCRequest.prototype.method = \"\";\n\n /**\n * Encodes the specified RPCRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCRequest} message RPCRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n if (message.method != null && Object.hasOwnProperty.call(message, \"method\"))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.method);\n return writer;\n };\n\n /**\n * Encodes the specified RPCRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCRequest} message RPCRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RPCRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RPCRequest} RPCRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RPCRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n case 2: {\n message.method = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RPCRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RPCRequest} RPCRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RPCRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RPCRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n if (message.method != null && message.hasOwnProperty(\"method\"))\n if (!$util.isString(message.method))\n return \"method: string expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RPCRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RPCRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RPCRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RPCRequest\";\n };\n\n return RPCRequest;\n })();\n\n protocol.RPCResult = (function() {\n\n /**\n * Properties of a RPCResult.\n * @memberof centrifugal.centrifuge.protocol\n * @interface IRPCResult\n * @property {Uint8Array|null} [data] RPCResult data\n */\n\n /**\n * Constructs a new RPCResult.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a RPCResult.\n * @implements IRPCResult\n * @constructor\n * @param {centrifugal.centrifuge.protocol.IRPCResult=} [properties] Properties to set\n */\n function RPCResult(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * RPCResult data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @instance\n */\n RPCResult.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified RPCResult message. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCResult.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCResult} message RPCResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCResult.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified RPCResult message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.RPCResult.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {centrifugal.centrifuge.protocol.IRPCResult} message RPCResult message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RPCResult.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RPCResult message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.RPCResult} RPCResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCResult.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.RPCResult();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a RPCResult message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.RPCResult} RPCResult\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RPCResult.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a RPCResult message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n RPCResult.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for RPCResult\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.RPCResult\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n RPCResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.RPCResult\";\n };\n\n return RPCResult;\n })();\n\n protocol.SendRequest = (function() {\n\n /**\n * Properties of a SendRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @interface ISendRequest\n * @property {Uint8Array|null} [data] SendRequest data\n */\n\n /**\n * Constructs a new SendRequest.\n * @memberof centrifugal.centrifuge.protocol\n * @classdesc Represents a SendRequest.\n * @implements ISendRequest\n * @constructor\n * @param {centrifugal.centrifuge.protocol.ISendRequest=} [properties] Properties to set\n */\n function SendRequest(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SendRequest data.\n * @member {Uint8Array} data\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @instance\n */\n SendRequest.prototype.data = $util.newBuffer([]);\n\n /**\n * Encodes the specified SendRequest message. Does not implicitly {@link centrifugal.centrifuge.protocol.SendRequest.verify|verify} messages.\n * @function encode\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISendRequest} message SendRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SendRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.data != null && Object.hasOwnProperty.call(message, \"data\"))\n writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);\n return writer;\n };\n\n /**\n * Encodes the specified SendRequest message, length delimited. Does not implicitly {@link centrifugal.centrifuge.protocol.SendRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {centrifugal.centrifuge.protocol.ISendRequest} message SendRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SendRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SendRequest message from the specified reader or buffer.\n * @function decode\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {centrifugal.centrifuge.protocol.SendRequest} SendRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SendRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.centrifugal.centrifuge.protocol.SendRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.data = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SendRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {centrifugal.centrifuge.protocol.SendRequest} SendRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SendRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SendRequest message.\n * @function verify\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {Object.<string,*>} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SendRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.data != null && message.hasOwnProperty(\"data\"))\n if (!(message.data && typeof message.data.length === \"number\" || $util.isString(message.data)))\n return \"data: buffer expected\";\n return null;\n };\n\n /**\n * Gets the default type url for SendRequest\n * @function getTypeUrl\n * @memberof centrifugal.centrifuge.protocol.SendRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/centrifugal.centrifuge.protocol.SendRequest\";\n };\n\n return SendRequest;\n })();\n\n return protocol;\n })();\n\n return centrifuge;\n })();\n\n return centrifugal;\n})();\n\nexport { $root as default };\n", "/**\n * This file is the entrypoint of browser builds.\n * The code executes when loaded in a browser.\n */\nimport { Centrifuge } from './centrifuge';\nimport { ProtobufCodec } from './protobuf.codec';\n\nexport default class CentrifugeProtobuf extends Centrifuge {\n protected _formatOverride() {\n this._codec = new ProtobufCodec();\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(globalThis as any).Centrifuge = CentrifugeProtobuf\n"],
|
|
5
|
+
"mappings": "2iBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAuBA,IAAIC,EAAI,OAAO,SAAY,SAAW,QAAU,KAC5CC,GAAeD,GAAK,OAAOA,EAAE,OAAU,WACvCA,EAAE,MACF,SAAsBE,EAAQC,EAAUC,EAAM,CAC9C,OAAO,SAAS,UAAU,MAAM,KAAKF,EAAQC,EAAUC,CAAI,CAC7D,EAEEC,EACAL,GAAK,OAAOA,EAAE,SAAY,WAC5BK,EAAiBL,EAAE,QACV,OAAO,sBAChBK,EAAiB,SAAwBH,EAAQ,CAC/C,OAAO,OAAO,oBAAoBA,CAAM,EACrC,OAAO,OAAO,sBAAsBA,CAAM,CAAC,CAChD,EAEAG,EAAiB,SAAwBH,EAAQ,CAC/C,OAAO,OAAO,oBAAoBA,CAAM,CAC1C,EAGF,SAASI,GAAmBC,EAAS,CAC/B,SAAW,QAAQ,MAAM,QAAQ,KAAKA,CAAO,CACnD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CACF,EE/EA,IAAqBG,GAArB,cAAgDC,CAAW,CAC7C,iBAAkB,CACxB,KAAK,OAAS,IAAIC,EACtB,CACJ,EAGC,WAAmB,WAAaF",
|
|
6
|
+
"names": ["require_events", "__commonJSMin", "exports", "module", "R", "ReflectApply", "target", "receiver", "args", "ReflectOwnKeys", "ProcessEmitWarning", "warning", "NumberIsNaN", "value", "EventEmitter", "once", "defaultMaxListeners", "checkListener", "listener", "arg", "n", "_getMaxListeners", "that", "type", "i", "doError", "events", "er", "err", "handler", "len", "listeners", "arrayClone", "_addListener", "prepend", "m", "existing", "w", "onceWrapper", "_onceWrap", "state", "wrapped", "list", "position", "originalListener", "spliceOne", "keys", "key", "_listeners", "unwrap", "evlistener", "unwrapListeners", "emitter", "listenerCount", "arr", "copy", "index", "ret", "name", "resolve", "reject", "errorListener", "resolver", "eventTargetAgnosticAddListener", "addErrorHandlerIfEventEmitter", "flags", "wrapListener", "require_aspromise", "__commonJSMin", "exports", "module", "asPromise", "fn", "ctx", "params", "offset", "index", "pending", "resolve", "reject", "err", "require_base64", "__commonJSMin", "exports", "base64", "string", "p", "b64", "s64", "i", "buffer", "start", "end", "parts", "chunk", "j", "t", "b", "invalidEncoding", "offset", "require_eventemitter", "__commonJSMin", "exports", "module", "EventEmitter", "evt", "fn", "ctx", "listeners", "i", "args", "require_float", "__commonJSMin", "exports", "module", "factory", "f32", "f8b", "le", "writeFloat_f32_cpy", "val", "buf", "pos", "writeFloat_f32_rev", "readFloat_f32_cpy", "readFloat_f32_rev", "writeFloat_ieee754", "writeUint", "sign", "exponent", "mantissa", "writeUintLE", "writeUintBE", "readFloat_ieee754", "readUint", "uint", "readUintLE", "readUintBE", "f64", "writeDouble_f64_cpy", "writeDouble_f64_rev", "readDouble_f64_cpy", "readDouble_f64_rev", "writeDouble_ieee754", "off0", "off1", "readDouble_ieee754", "lo", "hi", "require_inquire", "__commonJSMin", "e", "require_utf8", "__commonJSMin", "exports", "utf8", "string", "len", "c", "i", "buffer", "start", "end", "parts", "chunk", "t", "offset", "c1", "c2", "require_pool", "__commonJSMin", "exports", "module", "pool", "alloc", "slice", "size", "SIZE", "MAX", "slab", "offset", "buf", "require_longbits", "__commonJSMin", "exports", "module", "LongBits", "util", "lo", "hi", "zero", "zeroHash", "value", "sign", "unsigned", "charCodeAt", "hash", "mask", "part0", "part1", "part2", "require_minimal", "__commonJSMin", "exports", "util", "value", "obj", "prop", "Buffer", "sizeOrArray", "hash", "unsigned", "bits", "merge", "dst", "src", "ifNotSet", "keys", "i", "str", "newError", "name", "CustomError", "message", "properties", "fieldNames", "fieldMap", "encoding", "size", "require_writer", "__commonJSMin", "exports", "module", "Writer", "util", "BufferWriter", "LongBits", "base64", "utf8", "Op", "fn", "len", "val", "noop", "State", "writer", "create", "size", "writeByte", "buf", "pos", "writeVarint32", "VarintOp", "value", "writeVarint64", "bits", "writeFixed32", "writeBytes", "i", "head", "tail", "BufferWriter_", "require_writer_buffer", "__commonJSMin", "exports", "module", "BufferWriter", "Writer", "util", "val", "buf", "pos", "i", "value", "len", "writeStringBuffer", "require_reader", "__commonJSMin", "exports", "module", "Reader", "util", "BufferReader", "LongBits", "utf8", "indexOutOfRange", "reader", "writeLength", "buffer", "create_array", "create", "value", "readLongVarint", "bits", "i", "readFixed32_end", "buf", "end", "readFixed64", "length", "start", "nativeBuffer", "bytes", "wireType", "BufferReader_", "fn", "require_reader_buffer", "__commonJSMin", "exports", "module", "BufferReader", "Reader", "util", "buffer", "len", "require_service", "__commonJSMin", "exports", "module", "Service", "util", "rpcImpl", "requestDelimited", "responseDelimited", "rpcCall", "method", "requestCtor", "responseCtor", "request", "callback", "self", "err", "response", "endedByRPC", "require_rpc", "__commonJSMin", "exports", "rpc", "require_roots", "__commonJSMin", "exports", "module", "require_index_minimal", "__commonJSMin", "exports", "protobuf", "configure", "require_minimal", "__commonJSMin", "exports", "module", "import_events", "State", "SubscriptionState", "startsWith", "value", "prefix", "isFunction", "log", "level", "args", "logger", "randomInt", "min", "max", "backoff", "step", "interval", "errorExists", "data", "ttlMilliseconds", "ttl", "Subscription", "EventEmitter", "centrifuge", "channel", "options", "ctx", "timeout", "res", "rej", "data", "opts", "resolve", "reject", "timeoutDuration", "newState", "oldState", "result", "pubs", "i", "ttlMilliseconds", "code", "reason", "token", "e", "error", "UnauthorizedError", "cmd", "resolveCtx", "rejectCtx", "req", "offset", "epoch", "args", "sendUnsubscribe", "promise", "pub", "newData", "newPrevValue", "join", "info", "leave", "id", "err", "self", "delay", "errContext", "backoff", "getToken", "msg", "SockjsTransport", "endpoint", "options", "_protocol", "callbacks", "e", "closeEvent", "event", "data", "WebsocketTransport", "endpoint", "options", "protocol", "callbacks", "subProtocol", "httpHeaders", "hasHttpHeaders", "closeEvent", "event", "data", "HttpStreamTransport", "endpoint", "options", "response", "self", "eventTarget", "fetchFunc", "jsonStreamBuf", "jsonStreamPos", "protoStreamBuf", "reader", "controller", "pump", "done", "value", "line", "mergedArray", "result", "data", "error", "e", "protocol", "callbacks", "initialData", "headers", "body", "fetchOptions", "session", "node", "req", "SseTransport", "endpoint", "options", "_protocol", "callbacks", "initialData", "url", "eventsourceOptions", "eventSource", "self", "e", "data", "session", "node", "req", "headers", "body", "fetchFunc", "fetchOptions", "WebtransportTransport", "endpoint", "options", "protocol", "callbacks", "url", "eventTarget", "stream", "reader", "jsonStreamBuf", "jsonStreamPos", "protoStreamBuf", "done", "value", "line", "mergedArray", "result", "data", "binary", "zValue", "Reader", "array", "b", "v", "c", "Writer", "sourceType", "a", "start", "end", "i", "checksum", "arr", "sum0", "sum1", "sum2", "sum3", "z", "N", "applyDelta", "source", "delta", "total", "zDelta", "lenSrc", "lenDelta", "limit", "zOut", "cnt", "ofst", "out", "JsonCodec", "commands", "c", "data", "r", "pub", "prevValue", "newData", "newPrevValue", "valueArray", "applyDelta", "import_events", "defaults", "UnauthorizedError", "message", "Centrifuge", "EventEmitter", "endpoint", "options", "JsonCodec", "ctx", "channel", "sub", "Subscription", "timeout", "resolve", "reject", "token", "headers", "websocket", "data", "cmd", "method", "reply", "result", "publications", "i", "clients", "clientId", "rawClient", "connInfo", "chanInfo", "self", "args", "log", "transportConfig", "transportName", "newState", "oldState", "eventTarget", "delay", "backoff", "id", "callbacks", "errback", "commands", "command", "e", "sockjs", "eventsource", "fetchFunc", "readableStream", "count", "transportEndpoint", "WebsocketTransport", "WebtransportTransport", "HttpStreamTransport", "SseTransport", "SockjsTransport", "startsWith", "transport", "transportId", "wasOpen", "initialCommands", "connectCommand", "initialData", "connectTimeout", "closeEvent", "reason", "needReconnect", "code", "advice", "skipSending", "resolveCtx", "rejectCtx", "emptyToken", "err", "isInitialHandshake", "req", "subs", "hasSubs", "res", "rej", "resultCB", "replies", "finishDispatch", "p", "next", "reconnect", "previousState", "needEvent", "ttlMilliseconds", "_", "subCtx", "pubs", "epoch", "offset", "errorExists", "error", "callback", "join", "leave", "unsubscribe", "disconnect", "pub", "clientInfo", "info", "temporary", "errObject", "isFunction", "SubscriptionState", "State", "import_minimal", "$protobuf", "$Reader", "$Writer", "$util", "$root", "centrifugal", "centrifuge", "protocol", "Error", "properties", "keys", "i", "message", "writer", "reader", "length", "end", "tag", "typeUrlPrefix", "EmulationRequest", "Command", "error", "Reply", "Push", "ClientInfo", "Publication", "key", "value", "end2", "tag2", "Join", "Leave", "Unsubscribe", "Subscribe", "Message", "Connect", "Disconnect", "Refresh", "ConnectRequest", "ConnectResult", "RefreshRequest", "RefreshResult", "SubscribeRequest", "SubscribeResult", "SubRefreshRequest", "SubRefreshResult", "UnsubscribeRequest", "UnsubscribeResult", "PublishRequest", "PublishResult", "PresenceRequest", "PresenceResult", "PresenceStatsRequest", "PresenceStatsResult", "StreamPosition", "HistoryRequest", "HistoryResult", "PingRequest", "PingResult", "RPCRequest", "RPCResult", "SendRequest", "Command", "centrifugal", "Reply", "EmulationRequest", "ProtobufCodec", "req", "writer", "commands", "command", "replies", "reply", "data", "reader", "pub", "prevValue", "newData", "newPrevValue", "valueArray", "applyDelta", "CentrifugeProtobuf", "Centrifuge", "ProtobufCodec"]
|
|
7
7
|
}
|