From 31da56c177f1e11ffe0072ad5f58a55e3f8008fd Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Thu, 29 Dec 2016 17:26:39 +0100 Subject: [PATCH] Other: Various jsdoc improvements and a workaround for d.ts generation, see #592 --- cli/targets/json-module.js | 9 +- cli/targets/static.js | 2 +- dist/noparse/protobuf.js | 111 +- dist/noparse/protobuf.js.map | 2 +- dist/noparse/protobuf.min.js | 6 +- dist/noparse/protobuf.min.js.gz | Bin 14969 -> 14978 bytes dist/noparse/protobuf.min.js.map | 2 +- dist/protobuf.js | 131 +- dist/protobuf.js.map | 2 +- dist/protobuf.min.js | 8 +- dist/protobuf.min.js.gz | Bin 17780 -> 17793 bytes dist/protobuf.min.js.map | 2 +- dist/runtime/protobuf.js | 38 +- dist/runtime/protobuf.js.map | 2 +- dist/runtime/protobuf.min.js | 6 +- dist/runtime/protobuf.min.js.gz | Bin 5479 -> 5486 bytes dist/runtime/protobuf.min.js.map | 2 +- package.json | 5 +- src/common.js | 14 +- src/convert.js | 2 +- src/enum.js | 2 +- src/field.js | 8 +- src/index.js | 2 + src/mapfield.js | 6 +- src/message.js | 4 +- src/method.js | 12 +- src/namespace.js | 4 +- src/object.js | 4 +- src/oneof.js | 4 +- src/parse.js | 4 +- src/root.js | 5 +- src/service.js | 4 +- src/tokenize.js | 2 +- src/type.js | 8 +- src/util.js | 8 +- src/util/aspromise/index.js | 2 +- src/util/codegen/index.js | 2 +- src/util/eventemitter/index.js | 2 +- src/util/extend/index.js | 2 +- src/util/longbits.js | 28 +- src/util/runtime.js | 6 +- tests/data/test.d.ts | 4735 ++++++++++++++++++++++++++++++ tests/data/test.js | 8 +- tests/longbits.js | 71 + types/protobuf.js.d.ts | 225 +- types/test.ts | 2 +- 46 files changed, 5183 insertions(+), 321 deletions(-) create mode 100644 tests/data/test.d.ts create mode 100644 tests/longbits.js diff --git a/cli/targets/json-module.js b/cli/targets/json-module.js index c55d4d06d..505269bfd 100644 --- a/cli/targets/json-module.js +++ b/cli/targets/json-module.js @@ -1,11 +1,7 @@ "use strict"; module.exports = json_module; -var path = require("path"), - fs = require("fs"), - util = require("../util"); - -var protobuf = require("../.."); +var util = require("../util"); json_module.description = "JSON representation as a module" @@ -17,6 +13,7 @@ function json_module(root, options, callback) { callback(null, output); }); } catch (e) { - callback(e); + return callback(e); } + return undefined; } diff --git a/cli/targets/static.js b/cli/targets/static.js index 931eb05b3..cfe259eae 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -238,7 +238,7 @@ function buildType(ref, type) { var prop = util.safeProp(field.name); pushComment([ type.name + " " + field.name + ".", - prop.charAt(0) !== "." ? "@name " + fullName + "#" + name(field.name) : null, + prop.charAt(0) !== "." ? "@name " + fullName + "#" + field.name : null, "@type {" + jsType + "}" ]); if (Array.isArray(field.defaultValue)) { diff --git a/dist/noparse/protobuf.js b/dist/noparse/protobuf.js index 7bce448be..e1fb6cdfe 100644 --- a/dist/noparse/protobuf.js +++ b/dist/noparse/protobuf.js @@ -1,6 +1,6 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -951,7 +951,7 @@ convert.toJson = function toJson(field, value, options) { if (options.longs === String) { if(typeof value === "number") return util.Long.fromNumber(value, unsigned).toString(); - value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0) + value = util.Long.fromValue(value); // has no unsigned option value.unsigned = unsigned; return value.toString(); } @@ -1253,7 +1253,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Unique name within its namespace * @param {Object.} [values] Enum values as an object, by name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Enum(name, values, options) { ReflectionObject.call(this, name, options); @@ -1408,9 +1408,9 @@ var TypeError = util._TypeError; * @param {string} name Unique name within its namespace * @param {number} id Unique id within its namespace * @param {string} type Value type - * @param {string|Object} [rule="optional"] Field rule - * @param {string|Object} [extend] Extended type if different from parent - * @param {Object} [options] Declared options + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options */ function Field(name, id, type, rule, extend, options) { if (util.isObject(rule)) { @@ -1585,7 +1585,7 @@ Field.testJSON = function testJSON(json) { /** * Constructs a field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Field} Created field * @throws {TypeError} If arguments are invalid */ @@ -1680,7 +1680,7 @@ var types = require(30), * @param {number} id Unique id within its namespace * @param {string} keyType Key type * @param {string} type Value type - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function MapField(name, id, keyType, type, options) { Field.call(this, name, id, type, options); @@ -1707,7 +1707,7 @@ function MapField(name, id, keyType, type, options) { /** * Tests if the specified JSON object describes a map field. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a field */ MapField.testJSON = function testJSON(json) { @@ -1717,7 +1717,7 @@ MapField.testJSON = function testJSON(json) { /** * Constructs a map field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created map field * @throws {TypeError} If arguments are invalid */ @@ -1761,12 +1761,10 @@ var convert = require(12); /** * Constructs a new message instance. * - * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`. + * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`. * @classdesc Abstract runtime message. - * @extends {Object} * @constructor * @param {Object.} [properties] Properties to set - * @abstract * @see {@link Class.create} */ function Message(properties) { @@ -1890,14 +1888,16 @@ var TypeError = util._TypeError; * @param {string|undefined} type Method type, usually `"rpc"` * @param {string} requestType Request message type * @param {string} responseType Response message type - * @param {boolean|Object} [requestStream] Whether the request is streamed - * @param {boolean|Object} [responseStream] Whether the response is streamed - * @param {Object} [options] Declared options + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options */ function Method(name, type, requestType, responseType, requestStream, responseStream, options) { + /* istanbul ignore next */ if (util.isObject(requestStream)) { options = requestStream; requestStream = responseStream = undefined; + /* istanbul ignore next */ } else if (util.isObject(responseStream)) { options = responseStream; responseStream = undefined; @@ -1960,7 +1960,7 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /** * Tests if the specified JSON object describes a service method. - * @param {Object} json JSON object + * @param {*} json JSON object * @returns {boolean} `true` if the object describes a map field */ Method.testJSON = function testJSON(json) { @@ -1970,7 +1970,7 @@ Method.testJSON = function testJSON(json) { /** * Constructs a service method from JSON. * @param {string} name Method name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Method} Created method * @throws {TypeError} If arguments are invalid */ @@ -2050,7 +2050,7 @@ var TypeError = util._TypeError; * @extends ReflectionObject * @constructor * @param {string} name Namespace name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Namespace(name, options) { ReflectionObject.call(this, name, options); @@ -2119,7 +2119,7 @@ Namespace.testJSON = function testJSON(json) { /** * Constructs a namespace from JSON. * @param {string} name Namespace name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Namespace} Created namespace * @throws {TypeError} If arguments are invalid */ @@ -2448,7 +2448,7 @@ var TypeError = util._TypeError; * @classdesc Base class of all reflection objects. * @constructor * @param {string} name Object name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options * @abstract */ function ReflectionObject(name, options) { @@ -2526,7 +2526,7 @@ util.props(ReflectionObjectPrototype, { /** * Converts this reflection object to its JSON representation. - * @returns {Object} JSON object + * @returns {Object.} JSON object * @abstract */ ReflectionObjectPrototype.toJSON = function toJSON() { @@ -2652,7 +2652,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Oneof name * @param {string[]|Object} [fieldNames] Field names - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function OneOf(name, fieldNames, options) { if (!Array.isArray(fieldNames)) { @@ -2709,7 +2709,7 @@ OneOf.testJSON = function testJSON(json) { /** * Constructs a oneof from JSON. * @param {string} name Oneof name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created oneof * @throws {TypeError} If arguments are invalid */ @@ -3388,7 +3388,7 @@ var parse, // cyclic, might be excluded * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. * @extends Namespace * @constructor - * @param {Object} [options] Top level options + * @param {Object.} [options] Top level options */ function Root(options) { Namespace.call(this, "", options); @@ -3408,11 +3408,12 @@ function Root(options) { /** * Loads a JSON definition into a root namespace. - * @param {*} json JSON definition + * @param {Object.|*} json JSON definition * @param {Root} [root] Root namespace, defaults to create a new one if omitted * @returns {Root} Root namespace */ Root.fromJSON = function fromJSON(json, root) { + // note that `json` actually must be of type `Object.` but TypeScript if (!root) root = new Root(); return root.setOptions(json.options).addJSON(json.nested); @@ -3793,7 +3794,7 @@ function clearCache(service) { /** * Tests if the specified JSON object describes a service. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a service */ Service.testJSON = function testJSON(json) { @@ -3803,7 +3804,7 @@ Service.testJSON = function testJSON(json) { /** * Constructs a service from JSON. * @param {string} name Service name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ @@ -3981,7 +3982,7 @@ var encoder, // might become cyclic * @extends Namespace * @constructor * @param {string} name Message name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Type(name, options) { Namespace.call(this, name, options); @@ -4157,7 +4158,7 @@ var nestedTypes = [ Enum, Type, Field, Service ]; /** * Creates a type from JSON. * @param {string} name Message name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Type} Created message type */ Type.fromJSON = function fromJSON(name, json) { @@ -4282,7 +4283,7 @@ TypePrototype.remove = function remove(object) { /** * Creates a new message of this type using the specified properties. - * @param {Object} [properties] Properties to set + * @param {Object.} [properties] Properties to set * @returns {Message} Runtime message */ TypePrototype.create = function create(properties) { @@ -4291,7 +4292,7 @@ TypePrototype.create = function create(properties) { /** * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types. - * @param {Object} object JSON object + * @param {Object.} object JSON object * @param {MessageConversionOptions} [options] Conversion options * @returns {Message} Runtime message */ @@ -4589,7 +4590,7 @@ util.path = require(8); /** * Node's fs module if available. - * @type {Object} + * @type {Object.} */ util.fs = util.inquire("fs"); @@ -4622,10 +4623,10 @@ util._TypeError = function(name, description) { /** * Merges the properties of the source object into the destination object. - * @param {Object} dst Destination object - * @param {Object} src Source object + * @param {Object.} dst Destination object + * @param {Object.} src Source object * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object} Destination object + * @returns {Object.} Destination object */ util.merge = function merge(dst, src, ifNotSet) { if (src) { @@ -4720,6 +4721,13 @@ zero.toNumber = function() { return 0; }; zero.zzEncode = zero.zzDecode = function() { return this; }; zero.length = function() { return 1; }; +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + /** * Constructs new long bits from the specified number. * @param {number} value Value @@ -4728,10 +4736,11 @@ zero.length = function() { return 1; }; LongBits.fromNumber = function fromNumber(value) { if (value === 0) return zero; - var sign = value < 0; - value = Math.abs(value); + var sign = value < 0; + if (sign) + value = -value; var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; + hi = (value - lo) / 4294967296 >>> 0; if (sign) { hi = ~hi >>> 0; lo = ~lo >>> 0; @@ -4753,6 +4762,7 @@ LongBits.from = function from(value) { if (typeof value === "number") return LongBits.fromNumber(value); if (typeof value === "string") { + /* istanbul ignore else */ if (util.Long) value = util.Long.fromString(value); else @@ -4768,11 +4778,11 @@ LongBits.from = function from(value) { */ LongBitsPrototype.toNumber = function toNumber(unsigned) { if (!unsigned && this.hi >>> 31) { - this.lo = ~this.lo + 1 >>> 0; - this.hi = ~this.hi >>> 0; - if (!this.lo) - this.hi = this.hi + 1 >>> 0; - return -(this.lo + this.hi * 4294967296); + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); } return this.lo + this.hi * 4294967296; }; @@ -4785,6 +4795,7 @@ LongBitsPrototype.toNumber = function toNumber(unsigned) { LongBitsPrototype.toLong = function toLong(unsigned) { return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; }; @@ -4796,6 +4807,8 @@ var charCodeAt = String.prototype.charCodeAt; * @returns {util.LongBits} Bits */ LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; return new LongBits( ( charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 @@ -4969,7 +4982,7 @@ util.isObject = function isObject(value) { util.longToHash = function longToHash(value) { return value ? util.LongBits.from(value).toHash() - : "\0\0\0\0\0\0\0\0"; + : util.LongBits.zeroHash; }; /** @@ -5028,7 +5041,7 @@ util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util /** * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object - * @param {Object} descriptors Property descriptors + * @param {Object.} descriptors Property descriptors * @returns {undefined} */ util.props = function props(target, descriptors) { @@ -5041,7 +5054,7 @@ util.props = function props(target, descriptors) { * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object * @param {string} key Property name - * @param {Object} descriptor Property descriptor + * @param {Object.} descriptor Property descriptor * @returns {undefined} */ util.prop = function prop(target, key, descriptor) { @@ -5964,6 +5977,7 @@ protobuf.rpc = require(26); protobuf.util = require(31); protobuf.configure = configure; +/* istanbul ignore next */ /** * Reconfigures the library according to the environment. * @returns {undefined} @@ -5972,6 +5986,7 @@ function configure() { protobuf.Reader._configure(); } +/* istanbul ignore next */ // Be nice to AMD if (typeof define === "function" && define.amd) define(["long"], function(Long) { diff --git a/dist/noparse/protobuf.js.map b/dist/noparse/protobuf.js.map index 969d3793b..870a8959d 100644 --- a/dist/noparse/protobuf.js.map +++ b/dist/noparse/protobuf.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(18),\r\n util = require(31);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(29);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(15),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(29);\r\n Message = require(18);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0)\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(17);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(29);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(16);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(12);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @extends {Object}\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @abstract\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(29),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(15),\r\n Field = require(16),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(28);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(31);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(33);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(24);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(23);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(\"./parse\");\r\n common = require(\"./common\");\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(27);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(31);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(19),\r\n util = require(31),\r\n rpc = require(26);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(15),\r\n OneOf = require(22),\r\n Field = require(16),\r\n Service = require(28),\r\n Class = require(11),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(35),\r\n convert = require(12),\r\n util = require(31);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(14);\r\n decoder = require(13);\r\n verifier = require(34);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(31);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(33);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n Type = require(29),\r\n util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(35);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(33);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(18),\r\n util = require(31);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(29);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(15),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(29);\r\n Message = require(18);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // has no unsigned option\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object.} [rule=\"optional\"] Field rule\r\n * @param {string|Object.} [extend] Extended type if different from parent\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(17);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(29);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(16);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(12);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(29),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n /* istanbul ignore next */\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n /* istanbul ignore next */\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object.} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(15),\r\n Field = require(16),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object.} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(28);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(31);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object.} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object.} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(33);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(24);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(23);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object.} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {Object.|*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n // note that `json` actually must be of type `Object.` but TypeScript\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(\"./parse\");\r\n common = require(\"./common\");\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(27);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(31);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(19),\r\n util = require(31),\r\n rpc = require(26);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object.} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(15),\r\n OneOf = require(22),\r\n Field = require(16),\r\n Service = require(28),\r\n Class = require(11),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(35),\r\n convert = require(12),\r\n util = require(31);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object.} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object.} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(14);\r\n decoder = require(13);\r\n verifier = require(34);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(31);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(33);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object.}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n Type = require(29),\r\n util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(35);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(33);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n/* istanbul ignore next */\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/noparse/protobuf.min.js b/dist/noparse/protobuf.min.js index 0e1dc5261..ff1eb79fb 100644 --- a/dist/noparse/protobuf.min.js +++ b/dist/noparse/protobuf.min.js @@ -1,9 +1,9 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ !function t(e,i,n){function r(o,u){if(!i[o]){if(!e[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=i[o]={exports:{}};e[o][0].call(h.exports,function(t){var i=e[o][1][t];return r(i?i:t)},h,h.exports,t,e,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o1&&"="===t.charAt(e);)++i;return Math.ceil(3*t.length)/4-i};for(var r=new Array(64),s=new Array(123),o=0;o<64;)s[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,i){for(var n,s=[],o=0,u=0;e>2],n=(3&f)<<4,u=1;break;case 1:s[o++]=r[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[o++]=r[n|f>>6],s[o++]=r[63&f],u=0}}return u&&(s[o++]=r[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(t,e,i){for(var n,r=i,o=0,f=0;f1)break;if(void 0===(a=s[a]))throw Error(u);switch(o){case 0:n=a,o=1;break;case 1:e[i++]=n<<2|(48&a)>>4,n=a,o=2;break;case 2:e[i++]=(15&n)<<4|(60&a)>>2,n=a,o=3;break;case 3:e[i++]=(3&n)<<6|a,o=0}}if(1===o)throw Error(u);return i-r}},{}],3:[function(t,e,i){"use strict";function n(){function t(){for(var e=[],i=0;i ").replace(/\t/g," "));var s=Object.keys(i||(i={}));return Function.apply(null,s.concat("return "+r)).apply(null,s.map(function(t){return i[t]}))}for(var h=[],l=[],c=1,d=!1,p=0;p0?e.splice(--s,2):i?e.splice(s,1):++s:"."===e[s]?e.splice(s,1):++s;return n+e.join("/")};n.resolve=function(t,e,i){return i||(e=s(e)),r(e)?e:(i||(t=s(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?s(t+"/"+e):e)}},{}],9:[function(t,e,i){"use strict";function n(t,e,i){var n=i||8192,r=n>>>1,s=null,o=n;return function(i){if(i<1||i>r)return t(i);o+i>n&&(s=t(n),o=0);var u=e.call(s,o,o+=i);return 7&o&&(o=(7|o)+1),u}}e.exports=n},{}],10:[function(t,e,i){"use strict";var n=i;n.length=function(t){for(var e=0,i=0,n=0;n191&&r<224?o[u++]=(31&r)<<6|63&t[e++]:r>239&&r<365?(r=((7&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(r>>10),o[u++]=56320+(1023&r)):o[u++]=(15&r)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(t,e,i){for(var n,r,s=i,o=0;o>6|192,e[i++]=63&n|128):55296===(64512&n)&&56320===(64512&(r=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&r),++o,e[i++]=n>>18|240,e[i++]=n>>12&63|128,e[i++]=n>>6&63|128,e[i++]=63&n|128):(e[i++]=n>>12|224,e[i++]=n>>6&63|128,e[i++]=63&n|128);return i-s}},{}],11:[function(t,e,i){"use strict";function n(t){return r(t)}function r(e,i){if(s||(s=t(29)),!(e instanceof s))throw f("type","a Type");if(i){if("function"!=typeof i)throw f("ctor","a function")}else i=function(t){return function(e){t.call(this,e)}}(o);i.constructor=n;var r=i.prototype=new o;return r.constructor=i,u.merge(i,o,!0),i.$type=e,r.$type=e,e.getFieldsArray().forEach(function(t){r[t.name]=Array.isArray(t.resolve().defaultValue)?u.emptyArray:u.isObject(t.defaultValue)&&!t.long?u.emptyObject:t.defaultValue}),e.getOneofsArray().forEach(function(t){u.prop(r,t.resolve().name,{get:function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(t.oneof.indexOf(e[i])>-1)return e[i]},set:function(e){for(var i=t.oneof,n=0;n>>3){");for(var n=0;n>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",i,n,(e.id<<3|2)>>>0)}function r(t){for(var e,i,r=t.getFieldsArray(),f=t.getOneofsArray(),a=u.codegen("m","w")("w||(w=Writer.create())"),e=0;e>>0,8|o.mapKey[d],d),void 0===c?a("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()",e,i):a("w.uint32(%d).%s(%s[ks[i]])",16|c,l,i),a("w.ldelim()")("}")("}")}else h.repeated?h.packed&&void 0!==o.packed[l]?a("if(%s&&%s.length){",i,i)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",l,i)("w.ldelim()",h.id)("}"):(a("if(%s)",i)("for(var i=0;i<%s.length;++i)",i),void 0===c?n(a,h,e,i+"[i]"):a("w.uint32(%d).%s(%s[i])",(h.id<<3|c)>>>0,l,i)):h.partOf||(h.required||(h.long?a("if(%s!==undefined&&util.longNe(%s,%d,%d))",i,i,h.defaultValue.low,h.defaultValue.high):a("if(%s!==undefined&&%s!==%j)",i,i,h.defaultValue)),void 0===c?n(a,h,e,i):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,i))}for(var e=0;e>>0,l,i),a("break;")}a("}")}return a("return w")}e.exports=r;var s=t(15),o=t(30),u=t(31)},{15:15,30:30,31:31}],15:[function(t,e,i){"use strict";function n(t,e,i){s.call(this,t,i),this.values=e||{},this.c=null}function r(t){return t.c=null,t}e.exports=n;var s=t(21),o=s.extend(n);n.className="Enum";var u=t(31),f=u.b;u.props(o,{valuesById:{get:function(){return this.c||(this.c={},Object.keys(this.values).forEach(function(t){var e=this.values[t];if(this.c[e])throw Error("duplicate id "+e+" in "+this);this.c[e]=t},this)),this.c}}}),n.testJSON=function(t){return Boolean(t&&t.values)},n.fromJSON=function(t,e){return new n(t,e.values,e.options)},o.toJSON=function(){return{options:this.options,values:this.values}},o.add=function(t,e){if(!u.isString(t))throw f("name");if(!u.isInteger(e)||e<0)throw f("id","a non-negative integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(void 0!==this.getValuesById()[e])throw Error("duplicate id "+e+" in "+this);return this.values[t]=e,r(this)},o.remove=function(t){if(!u.isString(t))throw f("name");if(void 0===this.values[t])throw Error("'"+t+"' is not a name of "+this);return delete this.values[t],r(this)}},{21:21,31:31}],16:[function(t,e,i){"use strict";function n(t,e,i,n,s,o){if(h.isObject(n)?(o=n,n=s=void 0):h.isObject(s)&&(o=s,s=void 0),r.call(this,t,o),!h.isInteger(e)||e<0)throw l("id","a non-negative integer");if(!h.isString(i))throw l("type");if(void 0!==s&&!h.isString(s))throw l("extend");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw l("rule","a valid rule string");this.rule=n&&"optional"!==n?n:void 0,this.type=i,this.id=e,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!h.Long&&void 0!==a.long[i],this.bytes="bytes"===i,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.d=null}e.exports=n;var r=t(21),s=r.extend(n);n.className="Field";var o,u,f=t(15),a=t(30),h=t(31),l=h.b;h.props(s,{packed:{get:s.isPacked=function(){return null===this.d&&(this.d=this.getOption("packed")!==!1),this.d}}}),s.setOption=function(t,e,i){return"packed"===t&&(this.d=null),r.prototype.setOption.call(this,t,e,i)},n.testJSON=function(t){return Boolean(t&&void 0!==t.id)},n.fromJSON=function(e,i){return void 0!==i.keyType?(u||(u=t(17)),u.fromJSON(e,i)):new n(e,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=a.defaults[this.type];if(void 0===e)if(o||(o=t(29)),this.resolvedType=this.parent.lookup(this.type,o))e=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);e=0}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:(this.options&&void 0!==this.options.default?this.defaultValue=this.options.default:this.defaultValue=e,this.long&&(this.defaultValue=h.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue))),r.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(t,e,i){"use strict";function n(t,e,i,n,s){if(r.call(this,t,e,n,s),!f.isString(i))throw f.b("keyType");this.keyType=i,this.resolvedKeyType=null,this.map=!0}e.exports=n;var r=t(16),s=r.prototype,o=r.extend(n);n.className="MapField";var u=t(30),f=t(31);n.testJSON=function(t){return r.testJSON(t)&&void 0!==t.keyType},n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{16:16,30:30,31:31}],18:[function(t,e,i){"use strict";function n(t){if(t)for(var e=Object.keys(t),i=0;i0;){var n=t.shift();if(i.nested&&i.nested[n]){if(i=i.nested[n],!(i instanceof r))throw Error("path conflicts with non-namespace objects")}else i.add(i=new r(n))}return e&&i.addJSON(e),i},f.resolve=function(){a||(a=t(29)),h||(a=t(28));for(var e=this.getNestedArray(),i=0;i-1&&this.oneof.splice(e,1),t.parent&&t.parent.remove(t),t.partOf=null,this},o.onAdd=function(t){s.prototype.onAdd.call(this,t);var e=this;this.oneof.forEach(function(i){var n=t.get(i);n&&!n.partOf&&(n.partOf=e,e.i.push(n))}),r(this)},o.onRemove=function(t){this.i.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{16:16,21:21,31:31}],23:[function(t,e,i){"use strict";function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function r(t){this.buf=t,this.pos=0,this.len=t.length}function s(){var t=new O(0,0),e=0;if(this.len-this.pos>4){for(e=0;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(e=0;e<4;++e){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(e=0;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(e=0;e<5;++e){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function f(){return s.call(this).toLong(!0)}function a(){return s.call(this).toNumber(!0)}function h(){return s.call(this).zzDecode().toLong()}function l(){return s.call(this).zzDecode().toNumber()}function c(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new O(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(){w.Long?(k.int64=o,k.uint64=f,k.sint64=h,k.fixed64=p,k.sfixed64=y):(k.int64=u,k.uint64=a,k.sint64=l,k.fixed64=v,k.sfixed64=g)}e.exports=r;var b,w=t(33),O=w.LongBits,x=w.utf8;r.create=w.Buffer?function(e){return b||(b=t(24)),(r.create=function(t){return new b(t)})(e)}:function(t){return new r(t)};var k=r.prototype;k.j=w.Array.prototype.subarray||w.Array.prototype.slice,k.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},k.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var N="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(i,n){return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e[3]=i[n+3],t[0]}:function(i,n){return e[3]=i[n],e[2]=i[n+1],e[1]=i[n+2],e[0]=i[n+3],t[0]}}():function(t,e){var i=c(t,e+4),n=2*(i>>31)+1,r=i>>>23&255,s=8388607&i;return 255===r?s?NaN:n*(1/0):0===r?1.401298464324817e-45*n*s:n*Math.pow(2,r-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=N(this.buf,this.pos);return this.pos+=4,t};var A="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(i,n){return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e[3]=i[n+3],e[4]=i[n+4],e[5]=i[n+5],e[6]=i[n+6],e[7]=i[n+7],t[0]}:function(i,n){return e[7]=i[n],e[6]=i[n+1],e[5]=i[n+2],e[4]=i[n+3],e[3]=i[n+4],e[2]=i[n+5],e[1]=i[n+6],e[0]=i[n+7],t[0]}}():function(t,e){var i=c(t,e+4),n=c(t,e+8),r=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+i;return 2047===s?o?NaN:r*(1/0):0===s?5e-324*r*o:r*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=8,t},k.bytes=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw n(this,t);return this.pos+=t,e===i?new this.buf.constructor(0):this.j.call(this.buf,e,i)},k.string=function(){var t=this.bytes();return x.read(t,0,t.length)},k.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},k.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},r.k=m,m()},{24:24,33:33}],24:[function(t,e,i){"use strict";function n(t){r.call(this,t)}e.exports=n;var r=t(23),s=n.prototype=Object.create(r.prototype);s.constructor=n;var o=t(33);o.Buffer&&(s.j=o.Buffer.prototype.slice),s.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{23:23,33:33}],25:[function(t,e,i){"use strict";function n(t){o.call(this,"",t),this.deferred=[],this.files=[]}function r(){}function s(t){var e=t.parent.lookup(t.extend);if(e){var i=new h(t.getFullName(),t.id,t.type,t.rule,(void 0),t.options);return i.declaringField=t,t.extensionField=i,e.add(i),!0}return!1}e.exports=n;var o=t(20),u=o.extend(n);n.className="Root";var f,a,h=t(16),l=t(31);n.fromJSON=function(t,e){return e||(e=new n),e.setOptions(t.options).addJSON(t.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=t("./parse"),a=t("./common")}catch(t){}c=null};u.load=function t(e,i,n){function s(t,e){if(n){var i=n;n=null,i(t,e)}}function o(t,e){try{if(l.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),l.isString(e)){f.filename=t;var n=f(e,h,i);n.imports&&n.imports.forEach(function(e){u(h.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){u(h.resolvePath(t,e),!0)})}else h.setOptions(e.options).addJSON(e.nested)}catch(t){return void s(t)}d||p||s(null,h)}function u(t,e){var i=t.lastIndexOf("google/protobuf/");if(i>-1){var r=t.substring(i);r in a&&(t=r)}if(!(h.files.indexOf(t)>-1)){if(h.files.push(t),t in a)return void(d?o(t,a[t]):(++p,setTimeout(function(){--p,o(t,a[t])})));if(d){var u;try{u=l.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||s(t))}o(t,u)}else++p,l.fetch(t,function(i,r){if(--p,n)return i?void(e||s(i)):void o(t,r)})}}c&&c(),"function"==typeof i&&(n=i,i=void 0);var h=this;if(!n)return l.asPromise(t,h,e);var d=n===r,p=0;return l.isString(e)&&(e=[e]),e.forEach(function(t){u(h.resolvePath("",t))}),d?h:void(p||s(null,h))},u.loadSync=function(t,e){return this.load(t,e,r)},u.g=function(t){var e=this.deferred.slice();this.deferred=[];for(var i=0;i-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof o)for(var i=t.getNestedArray(),n=0;n>>0,r=(t-i)/4294967296>>>0;return e&&(r=~r>>>0,i=~i>>>0,++i>4294967295&&(i=0,++r>4294967295&&(r=0))),new n(i,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if("string"==typeof t){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){return!t&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var u=String.prototype.charCodeAt;n.fromHash=function(t){return new n((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}},{33:33}],33:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(32),util.base64=require(2),util.inquire=require(7),util.utf8=require(10),util.pool=require(9),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,i){return new t(e,i)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():"\0\0\0\0\0\0\0\0"},util.longFromHash=function(t,e){var i=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(i.lo,i.hi,e):i.toNumber(Boolean(e))},util.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=util.LongBits.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=util.LongBits.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},util.longNe=function(t,e,i){if("object"==typeof t)return t.low!==e||t.high!==i;var n=util.LongBits.from(t);return n.lo!==e||n.hi!==i},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,e){Object.keys(e).forEach(function(i){util.prop(t,i,e[i])})},util.prop=function(t,e,i){var n=util.ucFirst(e);i.get&&(t["get"+n]=i.get),i.set&&(t["set"+n]=util.isIE8?function(t){i.set.call(this,t),this[e]=t}:i.set),util.isIE8?void 0!==i.value&&(t[e]=i.value):Object.defineProperty(t,e,i)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,32:32,7:7,9:9}],34:[function(t,e,i){"use strict";function n(t,e){return"invalid value for field "+t.getFullName()+" ("+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected)"}function r(t,e,i,r){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",r)("default:")("return%j",n(e,"enum value"));for(var s=a.toArray(e.resolvedType.values),o=0;o127;)e[i++]=127&t|128,t>>>=7;e[i]=t}function a(t,e,i){for(;t.hi;)e[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[i++]=127&t.lo|128,t.lo=t.lo>>>7;e[i++]=t.lo}function h(t,e,i){e[i++]=255&t,e[i++]=t>>>8&255,e[i++]=t>>>16&255,e[i]=t>>>24}e.exports=o;var l,c=t(33),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=t(36)),(o.create=function(){return new l})()}:function(){return new o},o.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(t,e,i){return this.tail=this.tail.next=new n(t,e,i),this.len+=e,this},y.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},y.int32=function(t){return t<0?this.push(a,10,d.fromNumber(t)):this.uint32(t)},y.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},y.uint64=function(t){var e=d.from(t);return this.push(a,e.length(),e)},y.int64=y.uint64,y.sint64=function(t){var e=d.from(t).zzEncode();return this.push(a,e.length(),e)},y.bool=function(t){return this.push(u,1,t?1:0)},y.fixed32=function(t){return this.push(h,4,t>>>0)},y.sfixed32=function(t){return this.push(h,4,t<<1^t>>31)},y.fixed64=function(t){var e=d.from(t);return this.push(h,4,e.lo).push(h,4,e.hi)},y.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(h,4,e.lo).push(h,4,e.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(i,n,r){t[0]=i,n[r++]=e[0],n[r++]=e[1],n[r++]=e[2],n[r]=e[3]}:function(i,n,r){t[0]=i,n[r++]=e[3],n[r++]=e[2],n[r++]=e[1],n[r]=e[0]}}():function(t,e,i){var n=t<0?1:0;if(n&&(t=-t),0===t)h(1/t>0?0:2147483648,e,i);else if(isNaN(t))h(2147483647,e,i);else if(t>3.4028234663852886e38)h((n<<31|2139095040)>>>0,e,i);else if(t<1.1754943508222875e-38)h((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,i);else{var r=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-r)*8388608);h((n<<31|r+127<<23|s)>>>0,e,i)}};y.float=function(t){return this.push(g,4,t)};var m="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(i,n,r){t[0]=i,n[r++]=e[0],n[r++]=e[1],n[r++]=e[2],n[r++]=e[3],n[r++]=e[4],n[r++]=e[5],n[r++]=e[6],n[r]=e[7]}:function(i,n,r){t[0]=i,n[r++]=e[7],n[r++]=e[6],n[r++]=e[5],n[r++]=e[4],n[r++]=e[3],n[r++]=e[2],n[r++]=e[1],n[r]=e[0]}}():function(t,e,i){var n=t<0?1:0;if(n&&(t=-t),0===t)h(0,e,i),h(1/t>0?0:2147483648,e,i+4);else if(isNaN(t))h(4294967295,e,i),h(2147483647,e,i+4);else if(t>1.7976931348623157e308)h(0,e,i),h((n<<31|2146435072)>>>0,e,i+4);else{var r;if(t<2.2250738585072014e-308)r=t/5e-324,h(r>>>0,e,i),h((n<<31|r/4294967296)>>>0,e,i+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),r=t*Math.pow(2,-s),h(4503599627370496*r>>>0,e,i),h((n<<31|s+1023<<20|1048576*r&1048575)>>>0,e,i+4)}}};y.double=function(t){return this.push(m,8,t)};var b=c.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var n=0;n>>0;if("string"==typeof t&&e){var i=o.alloc(e=p.length(t));p.decode(t,i,0),t=i}return e?this.uint32(e).push(b,e,t):this.push(u,1,0)},y.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(r,0,0),this.len=0,this},y.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new n(r,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i).tail.next=t.next,this.tail=e,this.len+=i,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,e,i),i+=t.len,t=t.next;return e}},{33:33,36:36}],36:[function(t,e,i){"use strict";function n(){s.call(this)}function r(t,e,i){t.length<40?f.write(t,e,i):e.utf8Write(t,i)}e.exports=n;var s=t(35),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=t(33),f=u.utf8,a=u.Buffer;n.alloc=function(t){return(n.alloc=a.allocUnsafe)(t)};var h=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(t,e,i){e.set(t,i)}:function(t,e,i){t.copy(e,i,0,t.length)};o.bytes=function(t){"string"==typeof t&&(t=a.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(h,e,t),this},o.string=function(t){var e=a.byteLength(t);return this.uint32(e),e&&this.push(r,e,t),this}},{33:33,35:35}],37:[function(t,e,i){(function(e){"use strict";function n(t,e,i){return"function"==typeof e?(i=e,e=new o.Root):e||(e=new o.Root),e.load(t,i)}function r(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.k()}var o=e.protobuf=i;o.load=n,o.loadSync=r,o.roots={};try{o.tokenize=t("./tokenize"),o.parse=t("./parse"),o.common=t("./common")}catch(t){}o.Writer=t(35),o.BufferWriter=t(36),o.Reader=t(23),o.BufferReader=t(24),o.encoder=t(14),o.decoder=t(13),o.verifier=t(34),o.ReflectionObject=t(21),o.Namespace=t(20),o.Root=t(25),o.Enum=t(15),o.Type=t(29),o.Field=t(16),o.OneOf=t(22),o.MapField=t(17),o.Service=t(28),o.Method=t(19),o.Class=t(11),o.Message=t(18),o.types=t(30),o.rpc=t(26),o.util=t(31),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:void 0}]},{},[37]); +a.props(u,{methodsArray:{get:function(){return this.l||(this.l=a.toArray(this.methods))}}}),n.testJSON=function(t){return Boolean(t&&t.methods)},n.fromJSON=function(t,e){var i=new n(t,e.options);return e.methods&&Object.keys(e.methods).forEach(function(t){i.add(f.fromJSON(t,e.methods[t]))}),i},u.toJSON=function(){var t=o.toJSON.call(this);return{options:t&&t.options||void 0,methods:s.arrayToJSON(this.getMethodsArray())||{},nested:t&&t.nested||void 0}},u.get=function(t){return o.get.call(this,t)||this.methods[t]||null},u.resolveAll=function(){for(var t=this.getMethodsArray(),e=0;e>>0,r=(t-i)/4294967296>>>0;return e&&(r=~r>>>0,i=~i>>>0,++i>4294967295&&(i=0,++r>4294967295&&(r=0))),new n(i,r)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if("string"==typeof t){if(!r.Long)return n.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,i=~this.hi>>>0;return e||(i=i+1>>>0),-(e+4294967296*i)}return this.lo+4294967296*this.hi},s.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var f=String.prototype.charCodeAt;n.fromHash=function(t){return t===u?o:new n((f.call(t,0)|f.call(t,1)<<8|f.call(t,2)<<16|f.call(t,3)<<24)>>>0,(f.call(t,4)|f.call(t,5)<<8|f.call(t,6)<<16|f.call(t,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}},{33:33}],33:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(32),util.base64=require(2),util.inquire=require(7),util.utf8=require(10),util.pool=require(9),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,i){return new t(e,i)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():util.LongBits.zeroHash},util.longFromHash=function(t,e){var i=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(i.lo,i.hi,e):i.toNumber(Boolean(e))},util.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=util.LongBits.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=util.LongBits.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},util.longNe=function(t,e,i){if("object"==typeof t)return t.low!==e||t.high!==i;var n=util.LongBits.from(t);return n.lo!==e||n.hi!==i},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,e){Object.keys(e).forEach(function(i){util.prop(t,i,e[i])})},util.prop=function(t,e,i){var n=util.ucFirst(e);i.get&&(t["get"+n]=i.get),i.set&&(t["set"+n]=util.isIE8?function(t){i.set.call(this,t),this[e]=t}:i.set),util.isIE8?void 0!==i.value&&(t[e]=i.value):Object.defineProperty(t,e,i)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,32:32,7:7,9:9}],34:[function(t,e,i){"use strict";function n(t,e){return"invalid value for field "+t.getFullName()+" ("+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected)"}function r(t,e,i,r){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",r)("default:")("return%j",n(e,"enum value"));for(var s=a.toArray(e.resolvedType.values),o=0;o127;)e[i++]=127&t|128,t>>>=7;e[i]=t}function a(t,e,i){for(;t.hi;)e[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[i++]=127&t.lo|128,t.lo=t.lo>>>7;e[i++]=t.lo}function h(t,e,i){e[i++]=255&t,e[i++]=t>>>8&255,e[i++]=t>>>16&255,e[i]=t>>>24}e.exports=o;var l,c=t(33),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=t(36)),(o.create=function(){return new l})()}:function(){return new o},o.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(t,e,i){return this.tail=this.tail.next=new n(t,e,i),this.len+=e,this},y.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},y.int32=function(t){return t<0?this.push(a,10,d.fromNumber(t)):this.uint32(t)},y.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},y.uint64=function(t){var e=d.from(t);return this.push(a,e.length(),e)},y.int64=y.uint64,y.sint64=function(t){var e=d.from(t).zzEncode();return this.push(a,e.length(),e)},y.bool=function(t){return this.push(u,1,t?1:0)},y.fixed32=function(t){return this.push(h,4,t>>>0)},y.sfixed32=function(t){return this.push(h,4,t<<1^t>>31)},y.fixed64=function(t){var e=d.from(t);return this.push(h,4,e.lo).push(h,4,e.hi)},y.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(h,4,e.lo).push(h,4,e.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(i,n,r){t[0]=i,n[r++]=e[0],n[r++]=e[1],n[r++]=e[2],n[r]=e[3]}:function(i,n,r){t[0]=i,n[r++]=e[3],n[r++]=e[2],n[r++]=e[1],n[r]=e[0]}}():function(t,e,i){var n=t<0?1:0;if(n&&(t=-t),0===t)h(1/t>0?0:2147483648,e,i);else if(isNaN(t))h(2147483647,e,i);else if(t>3.4028234663852886e38)h((n<<31|2139095040)>>>0,e,i);else if(t<1.1754943508222875e-38)h((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,i);else{var r=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-r)*8388608);h((n<<31|r+127<<23|s)>>>0,e,i)}};y.float=function(t){return this.push(g,4,t)};var m="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(i,n,r){t[0]=i,n[r++]=e[0],n[r++]=e[1],n[r++]=e[2],n[r++]=e[3],n[r++]=e[4],n[r++]=e[5],n[r++]=e[6],n[r]=e[7]}:function(i,n,r){t[0]=i,n[r++]=e[7],n[r++]=e[6],n[r++]=e[5],n[r++]=e[4],n[r++]=e[3],n[r++]=e[2],n[r++]=e[1],n[r]=e[0]}}():function(t,e,i){var n=t<0?1:0;if(n&&(t=-t),0===t)h(0,e,i),h(1/t>0?0:2147483648,e,i+4);else if(isNaN(t))h(4294967295,e,i),h(2147483647,e,i+4);else if(t>1.7976931348623157e308)h(0,e,i),h((n<<31|2146435072)>>>0,e,i+4);else{var r;if(t<2.2250738585072014e-308)r=t/5e-324,h(r>>>0,e,i),h((n<<31|r/4294967296)>>>0,e,i+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),r=t*Math.pow(2,-s),h(4503599627370496*r>>>0,e,i),h((n<<31|s+1023<<20|1048576*r&1048575)>>>0,e,i+4)}}};y.double=function(t){return this.push(m,8,t)};var b=c.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var n=0;n>>0;if("string"==typeof t&&e){var i=o.alloc(e=p.length(t));p.decode(t,i,0),t=i}return e?this.uint32(e).push(b,e,t):this.push(u,1,0)},y.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(r,0,0),this.len=0,this},y.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new n(r,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i).tail.next=t.next,this.tail=e,this.len+=i,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,e,i),i+=t.len,t=t.next;return e}},{33:33,36:36}],36:[function(t,e,i){"use strict";function n(){s.call(this)}function r(t,e,i){t.length<40?f.write(t,e,i):e.utf8Write(t,i)}e.exports=n;var s=t(35),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=t(33),f=u.utf8,a=u.Buffer;n.alloc=function(t){return(n.alloc=a.allocUnsafe)(t)};var h=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(t,e,i){e.set(t,i)}:function(t,e,i){t.copy(e,i,0,t.length)};o.bytes=function(t){"string"==typeof t&&(t=a.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(h,e,t),this},o.string=function(t){var e=a.byteLength(t);return this.uint32(e),e&&this.push(r,e,t),this}},{33:33,35:35}],37:[function(t,e,i){(function(e){"use strict";function n(t,e,i){return"function"==typeof e?(i=e,e=new o.Root):e||(e=new o.Root),e.load(t,i)}function r(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.k()}var o=e.protobuf=i;o.load=n,o.loadSync=r,o.roots={};try{o.tokenize=t("./tokenize"),o.parse=t("./parse"),o.common=t("./common")}catch(t){}o.Writer=t(35),o.BufferWriter=t(36),o.Reader=t(23),o.BufferReader=t(24),o.encoder=t(14),o.decoder=t(13),o.verifier=t(34),o.ReflectionObject=t(21),o.Namespace=t(20),o.Root=t(25),o.Enum=t(15),o.Type=t(29),o.Field=t(16),o.OneOf=t(22),o.MapField=t(17),o.Service=t(28),o.Method=t(19),o.Class=t(11),o.Message=t(18),o.types=t(30),o.rpc=t(26),o.util=t(31),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:void 0}]},{},[37]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/noparse/protobuf.min.js.gz b/dist/noparse/protobuf.min.js.gz index d8759ce3770802a3eafc533db85569b6bda09d5e..ca432b94c4587e4dca83e411f3b2b17fab76f977 100644 GIT binary patch literal 14978 zcmV-|I(@|-iwFP!000021Ee|WcH%hJ|K}+vpDtQz3xk1BiHXDXzVEXWs*eM5P{on> zB)O_H;CKJ7B+E9W)-!*=zPg+4E_wLLlfU#n>FuP@;-<`_7pnJi7EPjY53O-;Jc?(e z_eI7TEqecCQvcT=e=hEKte~6T-?k;`jW2p%(6vSF#j|8QO-7U6-~aZx!Tf=(DOZ45 z@(q! z-jnqIN+xN)Uq8$ZP1*0~SW;a|-phgMlMyy>8swCQVNNJ&oj=2?&XYc zdiP>e7PR+q5Q;GPIKXqgmEu(|i_9+5;K!f8`1=oE{_)e#fBWOBpa1^T7XisC!*81! z-P1k&b0?%$$-b)QW)I8JDq3enfwob-MEq`$b{k}=MT}QVy_(mmO2if{(YPX8(o$;T zY**D-Mxmv8*@ixl@v zQPe2GiNgDuL93Y!8HwQs7{o+l1+Y0S6m2x3MkAKS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protobuf.min.js.map index 9f6289eb3..f0f618a51 100644 --- a/dist/noparse/protobuf.min.js.map +++ b/dist/noparse/protobuf.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","asPromise","fn","ctx","params","arguments","push","pending","Promise","resolve","reject","err","args","apply","this","base64","string","p","charAt","Math","ceil","b64","Array","s64","encode","buffer","start","end","j","b","String","fromCharCode","invalidEncoding","decode","offset","c","charCodeAt","undefined","codegen","gen","line","sprintf","level","indent","src","prev","blockOpenRe","test","branchRe","casingRe","inCase","breakRe","blockCloseRe","str","name","replace","join","eof","scope","source","verbose","console","log","keys","Object","Function","concat","map","key","format","$0","$1","arg","JSON","stringify","supported","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","listeners","splice","emit","extend","ctor","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","isAbsolute","normalize","parts","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","pool","alloc","slice","size","SIZE","MAX","slab","buf","utf8","len","read","chunk","write","c1","c2","Class","type","Type","TypeError","MessageCtor","properties","Message","util","merge","$type","getFieldsArray","forEach","field","isArray","defaultValue","emptyArray","isObject","long","emptyObject","getOneofsArray","oneof","prop","get","indexOf","set","value","setCtor","_TypeError","convert","destination","options","converter","defaults","fields","repeated","fieldsOnly","Enum","toJson","enums","resolvedType","getValuesById","longs","unsigned","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","Buffer","isBuffer","toMessage","getCtor","values","fromString","newBuffer","decoder","mtype","group","ref","safeProp","id","keyType","resolvedKeyType","types","basic","packed","genEncodeType","fieldIndex","encoder","oneofs","wireType","mapKey","partOf","required","low","high","ucName","oneofFields","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","className","props","valuesById","testJSON","json","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","rule","toLowerCase","optional","message","extensionField","declaringField","_packed","FieldPrototype","MapField","isPacked","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","nested","_nestedArray","_clearProperties","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","getNestedArray","nestedJson","ns","nestedName","getEnum","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","getRoot","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","root","fullName","getFullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucFirst","_fieldsArray","addFieldsToParent","OneOfPrototype","index","self","fieldName","indexOutOfRange","reader","writeLength","RangeError","pos","Reader","readLongVarint","bits","lo","hi","read_int64_long","toLong","read_int64_number","read_uint64_long","read_uint64_number","read_sint64_long","zzDecode","read_sint64_number","readFixed32","readFixed64","read_fixed64_long","read_fixed64_number","read_sfixed64_long","read_sfixed64_number","configure","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","BufferReader","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","sign","exponent","mantissa","NaN","Infinity","pow","float","readDouble","Float64Array","f64","double","skip","skipType","_configure","BufferReaderPrototype","utf8Slice","min","deferred","files","SYNC","handleExtension","extendedType","sisterField","RootPrototype","parse","common","resolvePath","initParser","load","filename","finish","cb","process","parsed","imports","weakImports","sync","queued","weak","idx","lastIndexOf","altname","substring","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","service","methodsArray","methodName","inherited","getMethodsArray","requestDelimited","responseDelimited","rpcService","method","lcFirst","request","requestData","setImmediate","responseData","response","err2","extensions","reserved","_fieldsById","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","verifier","Writer","fieldsById","names","fieldsArray","repeatedFieldsArray","filter","oneofsArray","oneOfName","getFieldsById","setup","fld","fork","ldelim","bake","description","dst","allocUnsafe","LongBitsPrototype","zero","zzEncode","abs","parseInt","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","isIE8","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","longNeq","longNe","val","toUpperCase","target","descriptors","descriptor","ucKey","defineProperty","invalid","expected","genVerifyValue","genVerifyKey","Op","next","noop","State","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","BufferWriter","WriterPrototype","writeFloat","isNaN","round","LN2","writeDouble","writeBytes","reset","writeStringBuffer","BufferWriterPrototype","writeBytesBuffer","copy","byteLength","protobuf","roots","tokenize","amd"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,E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A3R,SAAA5P,EAAA,IACAuhB,EAAA/P,QAAAxR,EAAA,IACAuhB,EAAAxQ,OAAA/Q,EAAA,IAGAuhB,EAAAvY,MAAAhJ,EAAA,IACAuhB,EAAAjY,QAAAtJ,EAAA,IAGAuhB,EAAApU,MAAAnN,EAAA,IACAuhB,EAAA9G,IAAAza,EAAA,IACAuhB,EAAAhY,KAAAvJ,EAAA,IACAuhB,EAAAnL,UAAAA,EAWA,kBAAApD,SAAAA,OAAA0O,KACA1O,QAAA,QAAA,SAAAjH,GAKA,MAJAA,KACAwV,EAAAhY,KAAAwC,KAAAA,EACAqK,KAEAmL","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(18),\r\n util = require(31);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(29);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(15),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(29);\r\n Message = require(18);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0)\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(17);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(29);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(16);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(12);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @extends {Object}\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @abstract\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(29),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(15),\r\n Field = require(16),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(28);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(31);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(33);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(24);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(23);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(\"./parse\");\r\n common = require(\"./common\");\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(27);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(31);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(19),\r\n util = require(31),\r\n rpc = require(26);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(15),\r\n OneOf = require(22),\r\n Field = require(16),\r\n Service = require(28),\r\n Class = require(11),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(35),\r\n convert = require(12),\r\n util = require(31);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(14);\r\n decoder = require(13);\r\n verifier = require(34);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(31);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(33);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n Type = require(29),\r\n util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(35);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(33);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","asPromise","fn","ctx","params","arguments","push","pending","Promise","resolve","reject","err","args","apply","this","base64","string","p","charAt","Math","ceil","b64","Array","s64","encode","buffer","start","end","j","b","String","fromCharCode","invalidEncoding","decode","offset","c","charCodeAt","undefined","codegen","gen","line","sprintf","level","indent","src","prev","blockOpenRe","test","branchRe","casingRe","inCase","breakRe","blockCloseRe","str","name","replace","join","eof","scope","source","verbose","console","log","keys","Object","Function","concat","map","key","format","$0","$1","arg","JSON","stringify","supported","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","listeners","splice","emit","extend","ctor","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","isAbsolute","normalize","parts","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","pool","alloc","slice","size","SIZE","MAX","slab","buf","utf8","len","read","chunk","write","c1","c2","Class","type","Type","TypeError","MessageCtor","properties","Message","util","merge","$type","getFieldsArray","forEach","field","isArray","defaultValue","emptyArray","isObject","long","emptyObject","getOneofsArray","oneof","prop","get","indexOf","set","value","setCtor","_TypeError","convert","destination","options","converter","defaults","fields","repeated","fieldsOnly","Enum","toJson","enums","resolvedType","getValuesById","longs","unsigned","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","Buffer","isBuffer","toMessage","getCtor","values","fromString","newBuffer","decoder","mtype","group","ref","safeProp","id","keyType","resolvedKeyType","types","basic","packed","genEncodeType","fieldIndex","encoder","oneofs","wireType","mapKey","partOf","required","low","high","ucName","oneofFields","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","className","props","valuesById","testJSON","json","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","rule","toLowerCase","optional","message","extensionField","declaringField","_packed","FieldPrototype","MapField","isPacked","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","nested","_nestedArray","_clearProperties","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","getNestedArray","nestedJson","ns","nestedName","getEnum","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","getRoot","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","root","fullName","getFullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucFirst","_fieldsArray","addFieldsToParent","OneOfPrototype","index","self","fieldName","indexOutOfRange","reader","writeLength","RangeError","pos","Reader","readLongVarint","bits","lo","hi","read_int64_long","toLong","read_int64_number","read_uint64_long","read_uint64_number","read_sint64_long","zzDecode","read_sint64_number","readFixed32","readFixed64","read_fixed64_long","read_fixed64_number","read_sfixed64_long","read_sfixed64_number","configure","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","BufferReader","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","sign","exponent","mantissa","NaN","Infinity","pow","float","readDouble","Float64Array","f64","double","skip","skipType","_configure","BufferReaderPrototype","utf8Slice","min","deferred","files","SYNC","handleExtension","extendedType","sisterField","RootPrototype","parse","common","resolvePath","initParser","load","filename","finish","cb","process","parsed","imports","weakImports","sync","queued","weak","idx","lastIndexOf","altname","substring","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","service","methodsArray","methodName","inherited","getMethodsArray","requestDelimited","responseDelimited","rpcService","method","lcFirst","request","requestData","setImmediate","responseData","response","err2","extensions","reserved","_fieldsById","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","verifier","Writer","fieldsById","names","fieldsArray","repeatedFieldsArray","filter","oneofsArray","oneOfName","getFieldsById","setup","fld","fork","ldelim","bake","description","dst","allocUnsafe","LongBitsPrototype","zero","zzEncode","zeroHash","parseInt","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","isIE8","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","longNeq","longNe","val","toUpperCase","target","descriptors","descriptor","ucKey","defineProperty","invalid","expected","genVerifyValue","genVerifyKey","Op","next","noop","State","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","BufferWriter","WriterPrototype","writeFloat","isNaN","round","LN2","writeDouble","writeBytes","reset","writeStringBuffer","BufferWriterPrototype","writeBytesBuffer","copy","byteLength","protobuf","roots","tokenize","amd"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCAA,YAWA,SAAAK,GAAAC,EAAAC,GAEA,IAAA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D,IAxHA,GAAAgJ,GAAAlD,EAAAkD,SAAAjhB,CAkDAihB,GAAAjI,KAAAA,EAeAiI,EAAAhH,SAAAA,EASAgH,EAAAC,QAGA,KACAD,EAAAE,SAAAzhB,EAAA,cACAuhB,EAAArI,MAAAlZ,EAAA,WACAuhB,EAAApI,OAAAnZ,EAAA,YACA,MAAAR,IAGA+hB,EAAAhF,OAAAvc,EAAA,IACAuhB,EAAAd,aAAAzgB,EAAA,IACAuhB,EAAAtM,OAAAjV,EAAA,IACAuhB,EAAA5K,aAAA3W,EAAA,IACAuhB,EAAA/T,QAAAxN,EAAA,IACAuhB,EAAA5U,QAAA3M,EAAA,IACAuhB,EAAAjF,SAAAtc,EAAA,IAGAuhB,EAAArT,iBAAAlO,EAAA,IACAuhB,EAAA7P,UAAA1R,EAAA,IACAuhB,EAAA5N,KAAA3T,EAAA,IACAuhB,EAAAnW,KAAApL,EAAA,IACAuhB,EAAArY,KAAAlJ,EAAA,IACAuhB,EAAApS,MAAAnP,EAAA,IACAuhB,EAAApN,MAAAnU,EAAA,IACAuhB,EAAA3R,SAAA5P,EAAA,IACAuhB,EAAA/P,QAAAxR,EAAA,IACAuhB,EAAAxQ,OAAA/Q,EAAA,IAGAuhB,EAAAvY,MAAAhJ,EAAA,IACAuhB,EAAAjY,QAAAtJ,EAAA,IAGAuhB,EAAApU,MAAAnN,EAAA,IACAuhB,EAAA9G,IAAAza,EAAA,IACAuhB,EAAAhY,KAAAvJ,EAAA,IACAuhB,EAAAnL,UAAAA,EAaA,kBAAApD,SAAAA,OAAA0O,KACA1O,QAAA,QAAA,SAAAjH,GAKA,MAJAA,KACAwV,EAAAhY,KAAAwC,KAAAA,EACAqK,KAEAmL","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(18),\r\n util = require(31);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(29);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(15),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(29);\r\n Message = require(18);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // has no unsigned option\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(15),\r\n types = require(30),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object.} [rule=\"optional\"] Field rule\r\n * @param {string|Object.} [extend] Extended type if different from parent\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(17);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(29);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(16);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(30),\r\n util = require(31);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(12);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(29),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n /* istanbul ignore next */\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n /* istanbul ignore next */\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object.} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(15),\r\n Field = require(16),\r\n util = require(31);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object.} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(28);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(29);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(28);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(31);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object.} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object.} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(25);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(21);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(33);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(24);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(23);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(16),\r\n util = require(31);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object.} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {Object.|*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n // note that `json` actually must be of type `Object.` but TypeScript\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(\"./parse\");\r\n common = require(\"./common\");\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(27);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(31);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(19),\r\n util = require(31),\r\n rpc = require(26);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object.} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(15),\r\n OneOf = require(22),\r\n Field = require(16),\r\n Service = require(28),\r\n Class = require(11),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(35),\r\n convert = require(12),\r\n util = require(31);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object.} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object.} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(14);\r\n decoder = require(13);\r\n verifier = require(34);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(31);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(33);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object.}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(33);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n Type = require(29),\r\n util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(35);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(33);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n/* istanbul ignore next */\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/protobuf.js b/dist/protobuf.js index ef0d8a4a4..c3b85d1ec 100644 --- a/dist/protobuf.js +++ b/dist/protobuf.js @@ -1,6 +1,6 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -858,14 +858,14 @@ module.exports = common; * Provides common type definitions. * Can also be used to provide additional google types or your own custom types. * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition * @returns {undefined} - * @property {Object} google/protobuf/any.proto Any - * @property {Object} google/protobuf/duration.proto Duration - * @property {Object} google/protobuf/empty.proto Empty - * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {Object} google/protobuf/timestamp.proto Timestamp - * @property {Object} google/protobuf/wrappers.proto Wrappers + * @property {Object.} google/protobuf/any.proto Any + * @property {Object.} google/protobuf/duration.proto Duration + * @property {Object.} google/protobuf/empty.proto Empty + * @property {Object.} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {Object.} google/protobuf/timestamp.proto Timestamp + * @property {Object.} google/protobuf/wrappers.proto Wrappers */ function common(name, json) { if (!/\/|\./.test(name)) { @@ -1158,7 +1158,7 @@ convert.toJson = function toJson(field, value, options) { if (options.longs === String) { if(typeof value === "number") return util.Long.fromNumber(value, unsigned).toString(); - value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0) + value = util.Long.fromValue(value); // has no unsigned option value.unsigned = unsigned; return value.toString(); } @@ -1460,7 +1460,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Unique name within its namespace * @param {Object.} [values] Enum values as an object, by name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Enum(name, values, options) { ReflectionObject.call(this, name, options); @@ -1615,9 +1615,9 @@ var TypeError = util._TypeError; * @param {string} name Unique name within its namespace * @param {number} id Unique id within its namespace * @param {string} type Value type - * @param {string|Object} [rule="optional"] Field rule - * @param {string|Object} [extend] Extended type if different from parent - * @param {Object} [options] Declared options + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options */ function Field(name, id, type, rule, extend, options) { if (util.isObject(rule)) { @@ -1792,7 +1792,7 @@ Field.testJSON = function testJSON(json) { /** * Constructs a field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Field} Created field * @throws {TypeError} If arguments are invalid */ @@ -1887,7 +1887,7 @@ var types = require(33), * @param {number} id Unique id within its namespace * @param {string} keyType Key type * @param {string} type Value type - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function MapField(name, id, keyType, type, options) { Field.call(this, name, id, type, options); @@ -1914,7 +1914,7 @@ function MapField(name, id, keyType, type, options) { /** * Tests if the specified JSON object describes a map field. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a field */ MapField.testJSON = function testJSON(json) { @@ -1924,7 +1924,7 @@ MapField.testJSON = function testJSON(json) { /** * Constructs a map field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created map field * @throws {TypeError} If arguments are invalid */ @@ -1968,12 +1968,10 @@ var convert = require(13); /** * Constructs a new message instance. * - * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`. + * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`. * @classdesc Abstract runtime message. - * @extends {Object} * @constructor * @param {Object.} [properties] Properties to set - * @abstract * @see {@link Class.create} */ function Message(properties) { @@ -2097,14 +2095,16 @@ var TypeError = util._TypeError; * @param {string|undefined} type Method type, usually `"rpc"` * @param {string} requestType Request message type * @param {string} responseType Response message type - * @param {boolean|Object} [requestStream] Whether the request is streamed - * @param {boolean|Object} [responseStream] Whether the response is streamed - * @param {Object} [options] Declared options + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options */ function Method(name, type, requestType, responseType, requestStream, responseStream, options) { + /* istanbul ignore next */ if (util.isObject(requestStream)) { options = requestStream; requestStream = responseStream = undefined; + /* istanbul ignore next */ } else if (util.isObject(responseStream)) { options = responseStream; responseStream = undefined; @@ -2167,7 +2167,7 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /** * Tests if the specified JSON object describes a service method. - * @param {Object} json JSON object + * @param {*} json JSON object * @returns {boolean} `true` if the object describes a map field */ Method.testJSON = function testJSON(json) { @@ -2177,7 +2177,7 @@ Method.testJSON = function testJSON(json) { /** * Constructs a service method from JSON. * @param {string} name Method name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Method} Created method * @throws {TypeError} If arguments are invalid */ @@ -2257,7 +2257,7 @@ var TypeError = util._TypeError; * @extends ReflectionObject * @constructor * @param {string} name Namespace name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Namespace(name, options) { ReflectionObject.call(this, name, options); @@ -2326,7 +2326,7 @@ Namespace.testJSON = function testJSON(json) { /** * Constructs a namespace from JSON. * @param {string} name Namespace name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Namespace} Created namespace * @throws {TypeError} If arguments are invalid */ @@ -2655,7 +2655,7 @@ var TypeError = util._TypeError; * @classdesc Base class of all reflection objects. * @constructor * @param {string} name Object name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options * @abstract */ function ReflectionObject(name, options) { @@ -2733,7 +2733,7 @@ util.props(ReflectionObjectPrototype, { /** * Converts this reflection object to its JSON representation. - * @returns {Object} JSON object + * @returns {Object.} JSON object * @abstract */ ReflectionObjectPrototype.toJSON = function toJSON() { @@ -2859,7 +2859,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Oneof name * @param {string[]|Object} [fieldNames] Field names - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function OneOf(name, fieldNames, options) { if (!Array.isArray(fieldNames)) { @@ -2916,7 +2916,7 @@ OneOf.testJSON = function testJSON(json) { /** * Constructs a oneof from JSON. * @param {string} name Oneof name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created oneof * @throws {TypeError} If arguments are invalid */ @@ -3066,7 +3066,7 @@ function camelCase(str) { /** * Result object returned from {@link parse}. * @typedef ParserResult - * @type {Object} + * @type {Object.} * @property {string|undefined} package Package name, if declared * @property {string[]|undefined} imports Imports, if any * @property {string[]|undefined} weakImports Weak imports, if any @@ -3077,7 +3077,7 @@ function camelCase(str) { /** * Options modifying the behavior of {@link parse}. * @typedef ParseOptions - * @type {Object} + * @type {Object.} * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case */ @@ -4264,7 +4264,7 @@ var parse, // cyclic, might be excluded * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. * @extends Namespace * @constructor - * @param {Object} [options] Top level options + * @param {Object.} [options] Top level options */ function Root(options) { Namespace.call(this, "", options); @@ -4284,11 +4284,12 @@ function Root(options) { /** * Loads a JSON definition into a root namespace. - * @param {*} json JSON definition + * @param {Object.|*} json JSON definition * @param {Root} [root] Root namespace, defaults to create a new one if omitted * @returns {Root} Root namespace */ Root.fromJSON = function fromJSON(json, root) { + // note that `json` actually must be of type `Object.` but TypeScript if (!root) root = new Root(); return root.setOptions(json.options).addJSON(json.nested); @@ -4669,7 +4670,7 @@ function clearCache(service) { /** * Tests if the specified JSON object describes a service. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a service */ Service.testJSON = function testJSON(json) { @@ -4679,7 +4680,7 @@ Service.testJSON = function testJSON(json) { /** * Constructs a service from JSON. * @param {string} name Service name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ @@ -4848,7 +4849,7 @@ function unescape(str) { /** * Handle object returned from {@link tokenize}. - * @typedef {Object} TokenizerHandle + * @typedef {Object.} TokenizerHandle * @property {function():number} line Gets the current line number * @property {function():?string} next Gets the next token and advances (`null` on eof) * @property {function():?string} peek Peeks for the next token (`null` on eof) @@ -5062,7 +5063,7 @@ var encoder, // might become cyclic * @extends Namespace * @constructor * @param {string} name Message name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Type(name, options) { Namespace.call(this, name, options); @@ -5238,7 +5239,7 @@ var nestedTypes = [ Enum, Type, Field, Service ]; /** * Creates a type from JSON. * @param {string} name Message name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Type} Created message type */ Type.fromJSON = function fromJSON(name, json) { @@ -5363,7 +5364,7 @@ TypePrototype.remove = function remove(object) { /** * Creates a new message of this type using the specified properties. - * @param {Object} [properties] Properties to set + * @param {Object.} [properties] Properties to set * @returns {Message} Runtime message */ TypePrototype.create = function create(properties) { @@ -5372,7 +5373,7 @@ TypePrototype.create = function create(properties) { /** * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types. - * @param {Object} object JSON object + * @param {Object.} object JSON object * @param {MessageConversionOptions} [options] Conversion options * @returns {Message} Runtime message */ @@ -5670,7 +5671,7 @@ util.path = require(8); /** * Node's fs module if available. - * @type {Object} + * @type {Object.} */ util.fs = util.inquire("fs"); @@ -5703,10 +5704,10 @@ util._TypeError = function(name, description) { /** * Merges the properties of the source object into the destination object. - * @param {Object} dst Destination object - * @param {Object} src Source object + * @param {Object.} dst Destination object + * @param {Object.} src Source object * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object} Destination object + * @returns {Object.} Destination object */ util.merge = function merge(dst, src, ifNotSet) { if (src) { @@ -5801,6 +5802,13 @@ zero.toNumber = function() { return 0; }; zero.zzEncode = zero.zzDecode = function() { return this; }; zero.length = function() { return 1; }; +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + /** * Constructs new long bits from the specified number. * @param {number} value Value @@ -5809,10 +5817,11 @@ zero.length = function() { return 1; }; LongBits.fromNumber = function fromNumber(value) { if (value === 0) return zero; - var sign = value < 0; - value = Math.abs(value); + var sign = value < 0; + if (sign) + value = -value; var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; + hi = (value - lo) / 4294967296 >>> 0; if (sign) { hi = ~hi >>> 0; lo = ~lo >>> 0; @@ -5834,6 +5843,7 @@ LongBits.from = function from(value) { if (typeof value === "number") return LongBits.fromNumber(value); if (typeof value === "string") { + /* istanbul ignore else */ if (util.Long) value = util.Long.fromString(value); else @@ -5849,11 +5859,11 @@ LongBits.from = function from(value) { */ LongBitsPrototype.toNumber = function toNumber(unsigned) { if (!unsigned && this.hi >>> 31) { - this.lo = ~this.lo + 1 >>> 0; - this.hi = ~this.hi >>> 0; - if (!this.lo) - this.hi = this.hi + 1 >>> 0; - return -(this.lo + this.hi * 4294967296); + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); } return this.lo + this.hi * 4294967296; }; @@ -5866,6 +5876,7 @@ LongBitsPrototype.toNumber = function toNumber(unsigned) { LongBitsPrototype.toLong = function toLong(unsigned) { return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; }; @@ -5877,6 +5888,8 @@ var charCodeAt = String.prototype.charCodeAt; * @returns {util.LongBits} Bits */ LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; return new LongBits( ( charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 @@ -6050,7 +6063,7 @@ util.isObject = function isObject(value) { util.longToHash = function longToHash(value) { return value ? util.LongBits.from(value).toHash() - : "\0\0\0\0\0\0\0\0"; + : util.LongBits.zeroHash; }; /** @@ -6109,7 +6122,7 @@ util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util /** * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object - * @param {Object} descriptors Property descriptors + * @param {Object.} descriptors Property descriptors * @returns {undefined} */ util.props = function props(target, descriptors) { @@ -6122,7 +6135,7 @@ util.props = function props(target, descriptors) { * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object * @param {string} key Property name - * @param {Object} descriptor Property descriptor + * @param {Object.} descriptor Property descriptor * @returns {undefined} */ util.prop = function prop(target, key, descriptor) { @@ -7045,6 +7058,7 @@ protobuf.rpc = require(28); protobuf.util = require(34); protobuf.configure = configure; +/* istanbul ignore next */ /** * Reconfigures the library according to the environment. * @returns {undefined} @@ -7053,6 +7067,7 @@ function configure() { protobuf.Reader._configure(); } +/* istanbul ignore next */ // Be nice to AMD if (typeof define === "function" && define.amd) define(["long"], function(Long) { diff --git a/dist/protobuf.js.map b/dist/protobuf.js.map index 699c64b1d..0a4d4366a 100644 --- a/dist/protobuf.js.map +++ b/dist/protobuf.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/common.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(19),\r\n util = require(34);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(32);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n * @property {Object} google/protobuf/wrappers.proto Wrappers\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"wrappers\", {\r\n DoubleValue: {\r\n fields: {\r\n value: {\r\n type: \"double\",\r\n id: 1\r\n }\r\n }\r\n },\r\n FloatValue: {\r\n fields: {\r\n value: {\r\n type: \"float\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int64Value: {\r\n fields: {\r\n value: {\r\n type: \"int64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt64Value: {\r\n fields: {\r\n value: {\r\n type: \"uint64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int32Value: {\r\n fields: {\r\n value: {\r\n type: \"int32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt32Value: {\r\n fields: {\r\n value: {\r\n type: \"uint32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BoolValue: {\r\n fields: {\r\n value: {\r\n type: \"bool\",\r\n id: 1\r\n }\r\n }\r\n },\r\n StringValue: {\r\n fields: {\r\n value: {\r\n type: \"string\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BytesValue: {\r\n fields: {\r\n value: {\r\n type: \"bytes\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(16),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(32);\r\n Message = require(19);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0)\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(18);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(32);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(17);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(13);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @extends {Object}\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @abstract\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(32),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(16),\r\n Field = require(17),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(30);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(34);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(31),\r\n Root = require(27),\r\n Type = require(32),\r\n Field = require(17),\r\n MapField = require(18),\r\n OneOf = require(23),\r\n Enum = require(16),\r\n Service = require(30),\r\n Method = require(20),\r\n types = require(33),\r\n util = require(34);\r\n\r\nfunction isName(token) {\r\n return /^[a-zA-Z_][a-zA-Z_0-9]*$/.test(token);\r\n}\r\n\r\nfunction isTypeRef(token) {\r\n return /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction isFqTypeRef(token) {\r\n return /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Options modifying the behavior of {@link parse}.\r\n * @typedef ParseOptions\r\n * @type {Object}\r\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {Root} root Root to populate\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @property {string} filename=null Currently processing file name for error reporting, if known\r\n */\r\nfunction parse(source, root, options) {\r\n /* eslint-disable callback-return */\r\n if (!(root instanceof Root)) {\r\n root = new Root();\r\n options = root || {};\r\n } else if (!options)\r\n options = {};\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n var applyCase = options.keepCase ? function(name) { return name; } : camelCase;\r\n\r\n function illegal(token, name) {\r\n var filename = parse.filename;\r\n parse.filename = null;\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line() + \")\");\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === \"\\\"\" || token === \"'\");\r\n return values.join(\"\");\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case \"'\":\r\n case \"\\\"\":\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && isTypeRef(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(\";\");\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === \"-\") {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, \"number\");\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"max\": return 536870911;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === \"-\" && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!isTypeRef(pkg))\r\n throw illegal(pkg, \"name\");\r\n ptr = ptr.define(pkg);\r\n skip(\";\");\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(\";\");\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n isProto3 = syntax === \"proto3\";\r\n if (!isProto3 && syntax !== \"proto2\")\r\n throw illegal(syntax, \"syntax\");\r\n skip(\";\");\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case \"option\":\r\n parseOption(parent, token);\r\n skip(\";\");\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, tokenLower);\r\n break;\r\n\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n default:\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, \"optional\");\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (lower(type) === \"group\") {\r\n parseGroup(parent, rule);\r\n return;\r\n }\r\n if (!isTypeRef(type))\r\n throw illegal(type, \"type\");\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\r\n // parsing proto2 descriptors without the option, where applicable.\r\n if (field.repeated && types.packed[type] !== undefined && !isProto3)\r\n field.setOption(\"packed\", false, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseGroup(parent, rule) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var fieldName = util.lcFirst(name);\r\n if (name === fieldName)\r\n name = util.ucFirst(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var type = new Type(name);\r\n type.group = true;\r\n var field = new Field(fieldName, id, name, rule);\r\n skip(\"{\");\r\n while ((token = next()) !== \"}\") {\r\n switch (token = lower(token)) {\r\n case \"option\":\r\n parseOption(type, token);\r\n skip(\";\");\r\n break;\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, token);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token); // there are no groups with proto3 semantics\r\n }\r\n }\r\n skip(\";\", true);\r\n parent.add(type).add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n\r\n /* istanbul ignore next */\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, \"type\");\r\n skip(\",\");\r\n var valueType = next();\r\n /* istanbul ignore next */\r\n if (!isTypeRef(valueType))\r\n throw illegal(valueType, \"type\");\r\n skip(\">\");\r\n var name = next();\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (token === \"option\") {\r\n parseOption(oneof, token);\r\n skip(\";\");\r\n } else {\r\n push(token);\r\n parseField(oneof, \"optional\");\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (lower(token) === \"option\") {\r\n parseOption(enm, token);\r\n skip(\";\");\r\n } else\r\n parseEnumField(enm, token);\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(\"(\", true);\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(name))\r\n throw illegal(name, \"name\");\r\n\r\n if (custom) {\r\n skip(\")\");\r\n name = \"(\" + name + \")\";\r\n token = peek();\r\n if (isFqTypeRef(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, \"option\");\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(\";\");\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"service name\");\r\n\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(service, tokenLower);\r\n skip(\";\");\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(\"(\");\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(\")\"); skip(\"returns\"); skip(\"(\");\r\n if (skip(st, true))\r\n responseStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n\r\n responseType = token;\r\n skip(\")\");\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(method, tokenLower);\r\n skip(\";\");\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(reference))\r\n throw illegal(reference, \"reference\");\r\n\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"required\":\r\n case \"repeated\":\r\n case \"optional\":\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n /* istanbul ignore next */\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, \"optional\", reference);\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case \"option\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(\";\");\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n /* istanbul ignore next */\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n parse.filename = null;\r\n return {\r\n \"package\" : pkg,\r\n \"imports\" : imports,\r\n weakImports : weakImports,\r\n syntax : syntax,\r\n root : root\r\n };\r\n}\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @name parse\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @variation 2\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(36);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(26);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(25);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(24);\r\n common = require(12);\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(29);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(34);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(20),\r\n util = require(34),\r\n rpc = require(28);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n/**/\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable callback-return */\r\n source = source.toString();\r\n\r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n\r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /* istanbul ignore next */\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === \"/\") {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === \"/\") { // Line\r\n while (charAt(++offset) !== \"\\n\")\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\r\n do {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== \"*\" || curr !== \"/\");\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return \"/\";\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === \"\\\"\" || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(16),\r\n OneOf = require(23),\r\n Field = require(17),\r\n Service = require(30),\r\n Class = require(11),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(38),\r\n convert = require(13),\r\n util = require(34);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(15);\r\n decoder = require(14);\r\n verifier = require(37);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(34);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(36);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(16),\r\n Type = require(32),\r\n util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(38);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(36);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/common.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(19),\r\n util = require(34);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(32);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object.} google/protobuf/any.proto Any\r\n * @property {Object.} google/protobuf/duration.proto Duration\r\n * @property {Object.} google/protobuf/empty.proto Empty\r\n * @property {Object.} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object.} google/protobuf/timestamp.proto Timestamp\r\n * @property {Object.} google/protobuf/wrappers.proto Wrappers\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"wrappers\", {\r\n DoubleValue: {\r\n fields: {\r\n value: {\r\n type: \"double\",\r\n id: 1\r\n }\r\n }\r\n },\r\n FloatValue: {\r\n fields: {\r\n value: {\r\n type: \"float\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int64Value: {\r\n fields: {\r\n value: {\r\n type: \"int64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt64Value: {\r\n fields: {\r\n value: {\r\n type: \"uint64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int32Value: {\r\n fields: {\r\n value: {\r\n type: \"int32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt32Value: {\r\n fields: {\r\n value: {\r\n type: \"uint32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BoolValue: {\r\n fields: {\r\n value: {\r\n type: \"bool\",\r\n id: 1\r\n }\r\n }\r\n },\r\n StringValue: {\r\n fields: {\r\n value: {\r\n type: \"string\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BytesValue: {\r\n fields: {\r\n value: {\r\n type: \"bytes\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(16),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(32);\r\n Message = require(19);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // has no unsigned option\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object.} [rule=\"optional\"] Field rule\r\n * @param {string|Object.} [extend] Extended type if different from parent\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(18);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(32);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(17);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(13);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(32),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n /* istanbul ignore next */\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n /* istanbul ignore next */\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object.} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(16),\r\n Field = require(17),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object.} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(30);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(34);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object.} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object.} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(31),\r\n Root = require(27),\r\n Type = require(32),\r\n Field = require(17),\r\n MapField = require(18),\r\n OneOf = require(23),\r\n Enum = require(16),\r\n Service = require(30),\r\n Method = require(20),\r\n types = require(33),\r\n util = require(34);\r\n\r\nfunction isName(token) {\r\n return /^[a-zA-Z_][a-zA-Z_0-9]*$/.test(token);\r\n}\r\n\r\nfunction isTypeRef(token) {\r\n return /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction isFqTypeRef(token) {\r\n return /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object.}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Options modifying the behavior of {@link parse}.\r\n * @typedef ParseOptions\r\n * @type {Object.}\r\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {Root} root Root to populate\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @property {string} filename=null Currently processing file name for error reporting, if known\r\n */\r\nfunction parse(source, root, options) {\r\n /* eslint-disable callback-return */\r\n if (!(root instanceof Root)) {\r\n root = new Root();\r\n options = root || {};\r\n } else if (!options)\r\n options = {};\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n var applyCase = options.keepCase ? function(name) { return name; } : camelCase;\r\n\r\n function illegal(token, name) {\r\n var filename = parse.filename;\r\n parse.filename = null;\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line() + \")\");\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === \"\\\"\" || token === \"'\");\r\n return values.join(\"\");\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case \"'\":\r\n case \"\\\"\":\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && isTypeRef(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(\";\");\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === \"-\") {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, \"number\");\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"max\": return 536870911;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === \"-\" && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!isTypeRef(pkg))\r\n throw illegal(pkg, \"name\");\r\n ptr = ptr.define(pkg);\r\n skip(\";\");\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(\";\");\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n isProto3 = syntax === \"proto3\";\r\n if (!isProto3 && syntax !== \"proto2\")\r\n throw illegal(syntax, \"syntax\");\r\n skip(\";\");\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case \"option\":\r\n parseOption(parent, token);\r\n skip(\";\");\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, tokenLower);\r\n break;\r\n\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n default:\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, \"optional\");\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (lower(type) === \"group\") {\r\n parseGroup(parent, rule);\r\n return;\r\n }\r\n if (!isTypeRef(type))\r\n throw illegal(type, \"type\");\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\r\n // parsing proto2 descriptors without the option, where applicable.\r\n if (field.repeated && types.packed[type] !== undefined && !isProto3)\r\n field.setOption(\"packed\", false, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseGroup(parent, rule) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var fieldName = util.lcFirst(name);\r\n if (name === fieldName)\r\n name = util.ucFirst(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var type = new Type(name);\r\n type.group = true;\r\n var field = new Field(fieldName, id, name, rule);\r\n skip(\"{\");\r\n while ((token = next()) !== \"}\") {\r\n switch (token = lower(token)) {\r\n case \"option\":\r\n parseOption(type, token);\r\n skip(\";\");\r\n break;\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, token);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token); // there are no groups with proto3 semantics\r\n }\r\n }\r\n skip(\";\", true);\r\n parent.add(type).add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n\r\n /* istanbul ignore next */\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, \"type\");\r\n skip(\",\");\r\n var valueType = next();\r\n /* istanbul ignore next */\r\n if (!isTypeRef(valueType))\r\n throw illegal(valueType, \"type\");\r\n skip(\">\");\r\n var name = next();\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (token === \"option\") {\r\n parseOption(oneof, token);\r\n skip(\";\");\r\n } else {\r\n push(token);\r\n parseField(oneof, \"optional\");\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (lower(token) === \"option\") {\r\n parseOption(enm, token);\r\n skip(\";\");\r\n } else\r\n parseEnumField(enm, token);\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(\"(\", true);\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(name))\r\n throw illegal(name, \"name\");\r\n\r\n if (custom) {\r\n skip(\")\");\r\n name = \"(\" + name + \")\";\r\n token = peek();\r\n if (isFqTypeRef(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, \"option\");\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(\";\");\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"service name\");\r\n\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(service, tokenLower);\r\n skip(\";\");\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(\"(\");\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(\")\"); skip(\"returns\"); skip(\"(\");\r\n if (skip(st, true))\r\n responseStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n\r\n responseType = token;\r\n skip(\")\");\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(method, tokenLower);\r\n skip(\";\");\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(reference))\r\n throw illegal(reference, \"reference\");\r\n\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"required\":\r\n case \"repeated\":\r\n case \"optional\":\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n /* istanbul ignore next */\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, \"optional\", reference);\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case \"option\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(\";\");\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n /* istanbul ignore next */\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n parse.filename = null;\r\n return {\r\n \"package\" : pkg,\r\n \"imports\" : imports,\r\n weakImports : weakImports,\r\n syntax : syntax,\r\n root : root\r\n };\r\n}\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @name parse\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @variation 2\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(36);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(26);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(25);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object.} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {Object.|*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n // note that `json` actually must be of type `Object.` but TypeScript\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(24);\r\n common = require(12);\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(29);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(34);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(20),\r\n util = require(34),\r\n rpc = require(28);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object.} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object.} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n/**/\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable callback-return */\r\n source = source.toString();\r\n\r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n\r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /* istanbul ignore next */\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === \"/\") {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === \"/\") { // Line\r\n while (charAt(++offset) !== \"\\n\")\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\r\n do {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== \"*\" || curr !== \"/\");\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return \"/\";\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === \"\\\"\" || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(16),\r\n OneOf = require(23),\r\n Field = require(17),\r\n Service = require(30),\r\n Class = require(11),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(38),\r\n convert = require(13),\r\n util = require(34);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object.} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object.} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(15);\r\n decoder = require(14);\r\n verifier = require(37);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(34);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(36);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object.}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(16),\r\n Type = require(32),\r\n util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(38);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(36);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n/* istanbul ignore next */\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/protobuf.min.js b/dist/protobuf.min.js index 5b80af1a2..39dd91054 100644 --- a/dist/protobuf.min.js +++ b/dist/protobuf.min.js @@ -1,9 +1,9 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ -!function t(e,r,n){function i(o,u){if(!r[o]){if(!e[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,r){for(var n,s=[],o=0,u=0;e>2],n=(3&a)<<4,u=1;break;case 1:s[o++]=i[n|a>>4],n=(15&a)<<2,u=2;break;case 2:s[o++]=i[n|a>>6],s[o++]=i[63&a],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(t,e,r){for(var n,i=r,o=0,a=0;a1)break;if(void 0===(f=s[f]))throw Error(u);switch(o){case 0:n=f,o=1;break;case 1:e[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:e[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:e[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i}},{}],3:[function(t,e,r){"use strict";function n(){function t(){for(var e=[],r=0;r ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return r[t]}))}for(var l=[],h=[],c=1,d=!1,p=0;p0?e.splice(--s,2):r?e.splice(s,1):++s:"."===e[s]?e.splice(s,1):++s;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=s(e)),i(e)?e:(r||(t=s(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?s(t+"/"+e):e)}},{}],9:[function(t,e,r){"use strict";function n(t,e,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return t(r);o+r>n&&(s=t(n),o=0);var u=e.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}e.exports=n},{}],10:[function(t,e,r){"use strict";var n=r;n.length=function(t){for(var e=0,r=0,n=0;n191&&i<224?o[u++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(t,e,r){for(var n,i,s=r,o=0;o>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-s}},{}],11:[function(t,e,r){"use strict";function n(t){return i(t)}function i(e,r){if(s||(s=t(32)),!(e instanceof s))throw a("type","a Type");if(r){if("function"!=typeof r)throw a("ctor","a function")}else r=function(t){return function(e){t.call(this,e)}}(o);r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=e,i.$type=e,e.getFieldsArray().forEach(function(t){i[t.name]=Array.isArray(t.resolve().defaultValue)?u.emptyArray:u.isObject(t.defaultValue)&&!t.long?u.emptyObject:t.defaultValue}),e.getOneofsArray().forEach(function(t){u.prop(i,t.resolve().name,{get:function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(t.oneof.indexOf(e[r])>-1)return e[r]},set:function(e){for(var r=t.oneof,n=0;n>>3){");for(var n=0;n>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function i(t){for(var e,r,i=t.getFieldsArray(),a=t.getOneofsArray(),f=u.codegen("m","w")("w||(w=Writer.create())"),e=0;e>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()",e,r):f("w.uint32(%d).%s(%s[ks[i]])",16|c,h,r),f("w.ldelim()")("}")("}")}else l.repeated?l.packed&&void 0!==o.packed[h]?f("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",h,r)("w.ldelim()",l.id)("}"):(f("if(%s)",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(f,l,e,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r)):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&util.longNe(%s,%d,%d))",r,r,l.defaultValue.low,l.defaultValue.high):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,e,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var e=0;e>>0,h,r),f("break;")}f("}")}return f("return w")}e.exports=i;var s=t(16),o=t(33),u=t(34)},{16:16,33:33,34:34}],16:[function(t,e,r){"use strict";function n(t,e,r){s.call(this,t,r),this.values=e||{},this.c=null}function i(t){return t.c=null,t}e.exports=n;var s=t(22),o=s.extend(n);n.className="Enum";var u=t(34),a=u.b;u.props(o,{valuesById:{get:function(){return this.c||(this.c={},Object.keys(this.values).forEach(function(t){var e=this.values[t];if(this.c[e])throw Error("duplicate id "+e+" in "+this);this.c[e]=t},this)),this.c}}}),n.testJSON=function(t){return Boolean(t&&t.values)},n.fromJSON=function(t,e){return new n(t,e.values,e.options)},o.toJSON=function(){return{options:this.options,values:this.values}},o.add=function(t,e){if(!u.isString(t))throw a("name");if(!u.isInteger(e)||e<0)throw a("id","a non-negative integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(void 0!==this.getValuesById()[e])throw Error("duplicate id "+e+" in "+this);return this.values[t]=e,i(this)},o.remove=function(t){if(!u.isString(t))throw a("name");if(void 0===this.values[t])throw Error("'"+t+"' is not a name of "+this);return delete this.values[t],i(this)}},{22:22,34:34}],17:[function(t,e,r){"use strict";function n(t,e,r,n,s,o){if(l.isObject(n)?(o=n,n=s=void 0):l.isObject(s)&&(o=s,s=void 0),i.call(this,t,o),!l.isInteger(e)||e<0)throw h("id","a non-negative integer");if(!l.isString(r))throw h("type");if(void 0!==s&&!l.isString(s))throw h("extend");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw h("rule","a valid rule string");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=e,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.d=null}e.exports=n;var i=t(22),s=i.extend(n);n.className="Field";var o,u,a=t(16),f=t(33),l=t(34),h=l.b;l.props(s,{packed:{get:s.isPacked=function(){return null===this.d&&(this.d=this.getOption("packed")!==!1),this.d}}}),s.setOption=function(t,e,r){return"packed"===t&&(this.d=null),i.prototype.setOption.call(this,t,e,r)},n.testJSON=function(t){return Boolean(t&&void 0!==t.id)},n.fromJSON=function(e,r){return void 0!==r.keyType?(u||(u=t(18)),u.fromJSON(e,r)):new n(e,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=f.defaults[this.type];if(void 0===e)if(o||(o=t(32)),this.resolvedType=this.parent.lookup(this.type,o))e=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);e=0}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:(this.options&&void 0!==this.options.default?this.defaultValue=this.options.default:this.defaultValue=e,this.long&&(this.defaultValue=l.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue))),i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(t,e,r){"use strict";function n(t,e,r,n,s){if(i.call(this,t,e,n,s),!a.isString(r))throw a.b("keyType");this.keyType=r,this.resolvedKeyType=null,this.map=!0}e.exports=n;var i=t(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=t(33),a=t(34);n.testJSON=function(t){return i.testJSON(t)&&void 0!==t.keyType},n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(t,e,r){"use strict";function n(t){if(t)for(var e=Object.keys(t),r=0;r0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return e&&r.addJSON(e),r},a.resolve=function(){f||(f=t(32)),l||(f=t(30));for(var e=this.getNestedArray(),r=0;r-1&&this.oneof.splice(e,1),t.parent&&t.parent.remove(t),t.partOf=null,this},o.onAdd=function(t){s.prototype.onAdd.call(this,t);var e=this;this.oneof.forEach(function(r){var n=t.get(r);n&&!n.partOf&&(n.partOf=e,e.i.push(n))}),i(this)},o.onRemove=function(t){this.i.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{17:17,22:22,34:34}],24:[function(t,e,r){"use strict";function n(t){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(t)}function i(t){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(t)}function s(t){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(t)}function o(t){return null===t?null:t.toLowerCase()}function u(t){return t.substring(0,1)+t.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(t,e){return e.toUpperCase()})}function a(t,e,r){function w(t,e){var r=a.filename;return a.filename=null,Error("illegal "+(e||"token")+" '"+t+"' ("+(r?r+", ":"")+"line "+Z.line()+")")}function k(){var t,e=[];do{if('"'!==(t=W())&&"'"!==t)throw w(t);e.push(W()),Q(t),t=G()}while('"'===t||"'"===t);return e.join("")}function x(t){var e=W();switch(o(e)){case"'":case'"':return X(e),k();case"true":return!0;case"false":return!1}try{return N(e)}catch(r){if(t&&i(e))return e;throw w(e,"value")}}function O(){var t=A(W()),e=t;return Q("to",!0)&&(e=A(W())),Q(";"),[t,e]}function N(t){var e=1;"-"===t.charAt(0)&&(e=-1,t=t.substring(1));var r=o(t);switch(r){case"inf":return e*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(t))return e*parseInt(t,10);if(/^0[x][0-9a-f]+$/.test(r))return e*parseInt(t,16);if(/^0[0-7]+$/.test(t))return e*parseInt(t,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return e*parseFloat(t);throw w(t,"number")}function A(t,e){var r=o(t);switch(r){case"max":return 536870911;case"0":return 0}if("-"===t.charAt(0)&&!e)throw w(t,"id");if(/^-?[1-9][0-9]*$/.test(t))return parseInt(t,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(t,16);if(/^-?0[0-7]+$/.test(t))return parseInt(t,8);throw w(t,"id")}function S(){if(void 0!==P)throw w("package");if(P=W(),!i(P))throw w(P,"name");rt=rt.define(P),Q(";")}function j(){var t,e=G();switch(e){case"weak":t=H||(H=[]),W();break;case"public":W();default:t=_||(_=[])}e=k(),Q(";"),t.push(e)}function T(){if(Q("="),K=o(k()),tt="proto3"===K,!tt&&"proto2"!==K)throw w(K,"syntax");Q(";")}function E(t,e){switch(e){case"option":return $(t,e),Q(";"),!0;case"message":return F(t,e),!0;case"enum":return V(t,e),!0;case"service":return C(t,e),!0;case"extend":return D(t,e),!0}return!1}function F(t,e){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(e=W());){var u=o(e);if(!E(s,e))switch(u){case"map":B(s,u);break;case"required":case"optional":case"repeated":J(s,u);break;case"oneof":L(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(O(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(O(s,u));break;default:if(!tt||!i(e))throw w(e);X(e),J(s,"optional")}}Q(";",!0)}else Q(";");t.add(s)}function J(t,e,r){var s=W();if("group"===o(s))return void q(t,e);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=nt(u),Q("=");var a=A(W()),f=M(new c(u,a,s,e,r));f.repeated&&void 0!==m.packed[s]&&!tt&&f.setOption("packed",!1,!0),t.add(f)}function q(t,e){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=A(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,e);for(Q("{");"}"!==(et=W());)switch(et=o(et)){case"option":$(u,et),Q(";");break;case"required":case"optional":case"repeated":J(u,et);break;default:throw w(et)}Q(";",!0),t.add(u).add(a)}function B(t){Q("<");var e=W();if(void 0===m.mapKey[e])throw w(e,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=nt(s),Q("=");var o=A(W()),u=M(new d(s,o,e,r));t.add(u)}function L(t,e){var r=W();if(!n(r))throw w(r,"name");r=nt(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(e=W());)"option"===e?($(i,e),Q(";")):(X(e),J(i,"optional"));Q(";",!0)}else Q(";");t.add(i)}function V(t,e){var r=W();if(!n(r))throw w(r,"name");var i={},s=new v(r,i);if(Q("{",!0)){for(;"}"!==(e=W());)"option"===o(e)?($(s,e),Q(";")):I(s,e);Q(";",!0)}else Q(";");t.add(s)}function I(t,e){if(!n(e))throw w(e,"name");var r=e;Q("=");var i=A(W(),!0);t.values[r]=i,M({})}function $(t,e){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",e=G(),s(e)&&(n+=e,W())),Q("="),z(t,n)}function z(t,e){if(Q("{",!0))for(;"}"!==(et=W());){if(!n(et))throw w(et,"name");e=e+"."+et,Q(":",!0)?R(t,e,x(!0)):z(t,e)}else R(t,e,x(!0))}function R(t,e,r){t.setOption?t.setOption(e,r):t[e]=r}function M(t){if(Q("[",!0)){do $(t,"option");while(Q(",",!0));Q("]")}return Q(";"),t}function C(t,e){if(e=W(),!n(e))throw w(e,"service name");var r=e,i=new y(r);if(Q("{",!0)){for(;"}"!==(e=W());){var s=o(e);switch(s){case"option":$(i,s),Q(";");break;case"rpc":U(i,s);break;default:throw w(e)}}Q(";",!0)}else Q(";");t.add(i)}function U(t,e){var r=e,s=W();if(!n(s))throw w(s,"name");var u,a,f,l;Q("(");var h;if(Q(h="stream",!0)&&(a=!0),!i(e=W()))throw w(e);if(u=e,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(e=W()))throw w(e);f=e,Q(")");var c=new g(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(e=W());){var d=o(e);switch(d){case"option":$(c,d),Q(";");break;default:throw w(e)}}Q(";",!0)}else Q(";");t.add(c)}function D(t,e){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(e=W());){var n=o(e);switch(n){case"required":case"repeated":case"optional":J(t,n,r);break;default:if(!tt||!i(e))throw w(e);X(e),J(t,"optional",r)}}Q(";",!0)}else Q(";")}e instanceof l?r||(r={}):(e=new l,r=e||{});var P,_,H,K,Z=f(t),W=Z.next,X=Z.push,G=Z.peek,Q=Z.skip,Y=!0,tt=!1;e||(e=new l);for(var et,rt=e,nt=r.keepCase?function(t){return t}:u;null!==(et=W());){var it=o(et);switch(it){case"package":if(!Y)throw w(et);S();break;case"import":if(!Y)throw w(et);j();break;case"syntax":if(!Y)throw w(et);T();break;case"option":if(!Y)throw w(et);$(rt,et),Q(";");break;default:if(E(rt,et)){Y=!1;continue}throw w(et)}}return a.filename=null,{package:P,imports:_,weakImports:H,syntax:K,root:e}}e.exports=a;var f=t(31),l=t(27),h=t(32),c=t(17),d=t(18),p=t(23),v=t(16),y=t(30),g=t(20),m=t(33),b=t(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(t,e,r){"use strict";function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function i(t){this.buf=t,this.pos=0,this.len=t.length}function s(){var t=new k(0,0),e=0;if(this.len-this.pos>4){for(e=0;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(e=0;e<4;++e){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(e=0;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t; -}else for(e=0;e<5;++e){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function a(){return s.call(this).toLong(!0)}function f(){return s.call(this).toNumber(!0)}function l(){return s.call(this).zzDecode().toLong()}function h(){return s.call(this).zzDecode().toNumber()}function c(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new k(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(){w.Long?(O.int64=o,O.uint64=a,O.sint64=l,O.fixed64=p,O.sfixed64=y):(O.int64=u,O.uint64=f,O.sint64=h,O.fixed64=v,O.sfixed64=g)}e.exports=i;var b,w=t(36),k=w.LongBits,x=w.utf8;i.create=w.Buffer?function(e){return b||(b=t(26)),(i.create=function(t){return new b(t)})(e)}:function(t){return new i(t)};var O=i.prototype;O.j=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},O.bool=function(){return 0!==this.uint32()},O.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},O.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var N="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],t[0]}:function(r,n){return e[3]=r[n],e[2]=r[n+1],e[1]=r[n+2],e[0]=r[n+3],t[0]}}():function(t,e){var r=c(t,e+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};O.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=N(this.buf,this.pos);return this.pos+=4,t};var A="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],e[4]=r[n+4],e[5]=r[n+5],e[6]=r[n+6],e[7]=r[n+7],t[0]}:function(r,n){return e[7]=r[n],e[6]=r[n+1],e[5]=r[n+2],e[4]=r[n+3],e[3]=r[n+4],e[2]=r[n+5],e[1]=r[n+6],e[0]=r[n+7],t[0]}}():function(t,e){var r=c(t,e+4),n=c(t,e+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};O.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=8,t},O.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw n(this,t);return this.pos+=t,e===r?new this.buf.constructor(0):this.j.call(this.buf,e,r)},O.string=function(){var t=this.bytes();return x.read(t,0,t.length)},O.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},i.k=m,m()},{26:26,36:36}],26:[function(t,e,r){"use strict";function n(t){i.call(this,t)}e.exports=n;var i=t(25),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=t(36);o.Buffer&&(s.j=o.Buffer.prototype.slice),s.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{25:25,36:36}],27:[function(t,e,r){"use strict";function n(t){o.call(this,"",t),this.deferred=[],this.files=[]}function i(){}function s(t){var e=t.parent.lookup(t.extend);if(e){var r=new l(t.getFullName(),t.id,t.type,t.rule,(void 0),t.options);return r.declaringField=t,t.extensionField=r,e.add(r),!0}return!1}e.exports=n;var o=t(21),u=o.extend(n);n.className="Root";var a,f,l=t(17),h=t(34);n.fromJSON=function(t,e){return e||(e=new n),e.setOptions(t.options).addJSON(t.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=t(24),f=t(12)}catch(t){}c=null};u.load=function t(e,r,n){function s(t,e){if(n){var r=n;n=null,r(t,e)}}function o(t,e){try{if(h.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),h.isString(e)){a.filename=t;var n=a(e,l,r);n.imports&&n.imports.forEach(function(e){u(l.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){u(l.resolvePath(t,e),!0)})}else l.setOptions(e.options).addJSON(e.nested)}catch(t){return void s(t)}d||p||s(null,l)}function u(t,e){var r=t.lastIndexOf("google/protobuf/");if(r>-1){var i=t.substring(r);i in f&&(t=i)}if(!(l.files.indexOf(t)>-1)){if(l.files.push(t),t in f)return void(d?o(t,f[t]):(++p,setTimeout(function(){--p,o(t,f[t])})));if(d){var u;try{u=h.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||s(t))}o(t,u)}else++p,h.fetch(t,function(r,i){if(--p,n)return r?void(e||s(r)):void o(t,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(t,l,e);var d=n===i,p=0;return h.isString(e)&&(e=[e]),e.forEach(function(t){u(l.resolvePath("",t))}),d?l:void(p||s(null,l))},u.loadSync=function(t,e){return this.load(t,e,i)},u.g=function(t){var e=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof o)for(var r=t.getNestedArray(),n=0;n0)return v.shift();if(y)return r();var n,o,u;do{if(c===d)return null;for(n=!1;/\s/.test(u=i(c));)if("\n"===u&&++p,++c===d)return null;if("/"===i(c)){if(++c===d)throw e("comment");if("/"===i(c)){for(;"\n"!==i(++c);)if(c===d)return null;++c,++p,n=!0}else{if("*"!==(u=i(c)))return"/";do{if("\n"===u&&++p,++c===d)return null;o=u,u=i(c)}while("*"!==o||"/"!==u);++c,n=!0}}}while(n);if(c===d)return null;var a=c;s.lastIndex=0;var f=s.test(i(a++));if(!f)for(;a]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],32:[function(t,e,r){"use strict";function n(t,e){s.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.m=null,this.i=null,this.n=null,this.o=null,this.p=null}function i(t){return t.m=t.i=t.o=t.p=null,delete t.encode,delete t.decode,delete t.verify,t}e.exports=n;var s=t(21),o=s.prototype,u=s.extend(n);n.className="Type";var a,f,l,h=t(16),c=t(23),d=t(17),p=t(30),v=t(11),y=t(19),g=t(25),m=t(38),b=t(13),w=t(34);w.props(u,{fieldsById:{get:function(){if(this.m)return this.m;this.m={};for(var t=Object.keys(this.fields),e=0;e>>0,i=(t-r)/4294967296>>>0;return e&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if("string"==typeof t){if(!i.Long)return n.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){return!t&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var u=String.prototype.charCodeAt;n.fromHash=function(t){return new n((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{36:36}],36:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(35),util.base64=require(2),util.inquire=require(7),util.utf8=require(10),util.pool=require(9),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,r){return new t(e,r)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():"\0\0\0\0\0\0\0\0"},util.longFromHash=function(t,e){var r=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},util.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=util.LongBits.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=util.LongBits.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},util.longNe=function(t,e,r){if("object"==typeof t)return t.low!==e||t.high!==r;var n=util.LongBits.from(t);return n.lo!==e||n.hi!==r},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,e){Object.keys(e).forEach(function(r){util.prop(t,r,e[r])})},util.prop=function(t,e,r){var n=util.ucFirst(e);r.get&&(t["get"+n]=r.get),r.set&&(t["set"+n]=util.isIE8?function(t){r.set.call(this,t),this[e]=t}:r.set),util.isIE8?void 0!==r.value&&(t[e]=r.value):Object.defineProperty(t,e,r)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,35:35,7:7,9:9}],37:[function(t,e,r){"use strict";function n(t,e){return"invalid value for field "+t.getFullName()+" ("+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected)"}function i(t,e,r,i){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",i)("default:")("return%j",n(e,"enum value"));for(var s=f.toArray(e.resolvedType.values),o=0;o127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function f(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function l(t,e,r){e[r++]=255&t,e[r++]=t>>>8&255,e[r++]=t>>>16&255,e[r]=t>>>24}e.exports=o;var h,c=t(36),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=t(39)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},y.uint32=function(t){return t>>>=0,this.push(a,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},y.int32=function(t){return t<0?this.push(f,10,d.fromNumber(t)):this.uint32(t)},y.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},y.uint64=function(t){var e=d.from(t);return this.push(f,e.length(),e)},y.int64=y.uint64,y.sint64=function(t){var e=d.from(t).zzEncode();return this.push(f,e.length(),e)},y.bool=function(t){return this.push(u,1,t?1:0)},y.fixed32=function(t){return this.push(l,4,t>>>0)},y.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},y.fixed64=function(t){var e=d.from(t);return this.push(l,4,e.lo).push(l,4,e.hi)},y.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(l,4,e.lo).push(l,4,e.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i]=e[3]}:function(r,n,i){t[0]=r,n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)l(1/t>0?0:2147483648,e,r);else if(isNaN(t))l(2147483647,e,r);else if(t>3.4028234663852886e38)l((n<<31|2139095040)>>>0,e,r);else if(t<1.1754943508222875e-38)l((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,r);else{var i=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,e,r)}};y.float=function(t){return this.push(g,4,t)};var m="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i]=e[7]}:function(r,n,i){t[0]=r,n[i++]=e[7],n[i++]=e[6],n[i++]=e[5],n[i++]=e[4],n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)l(0,e,r),l(1/t>0?0:2147483648,e,r+4);else if(isNaN(t))l(4294967295,e,r),l(2147483647,e,r+4);else if(t>1.7976931348623157e308)l(0,e,r),l((n<<31|2146435072)>>>0,e,r+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,l(i>>>0,e,r),l((n<<31|i/4294967296)>>>0,e,r+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),i=t*Math.pow(2,-s),l(4503599627370496*i>>>0,e,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,e,r+4)}}};y.double=function(t){return this.push(m,8,t)};var b=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n>>0;if("string"==typeof t&&e){var r=o.alloc(e=p.length(t));p.decode(t,r,0),t=r}return e?this.uint32(e).push(b,e,t):this.push(u,1,0)},y.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new n(i,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=e,this.len+=r,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e}},{36:36,39:39}],39:[function(t,e,r){"use strict";function n(){s.call(this)}function i(t,e,r){t.length<40?a.write(t,e,r):e.utf8Write(t,r)}e.exports=n;var s=t(38),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=t(36),a=u.utf8,f=u.Buffer;n.alloc=function(t){return(n.alloc=f.allocUnsafe)(t)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){t.copy(e,r,0,t.length)};o.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(l,e,t),this},o.string=function(t){var e=f.byteLength(t);return this.uint32(e),e&&this.push(i,e,t),this}},{36:36,38:38}],40:[function(t,e,r){(function(e){"use strict";function n(t,e,r){return"function"==typeof e?(r=e,e=new o.Root):e||(e=new o.Root),e.load(t,r)}function i(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.k()}var o=e.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=t(31),o.parse=t(24),o.common=t(12)}catch(t){}o.Writer=t(38),o.BufferWriter=t(39),o.Reader=t(25),o.BufferReader=t(26),o.encoder=t(15),o.decoder=t(14),o.verifier=t(37),o.ReflectionObject=t(22),o.Namespace=t(21),o.Root=t(27),o.Enum=t(16),o.Type=t(32),o.Field=t(17),o.OneOf=t(23),o.MapField=t(18),o.Service=t(30),o.Method=t(20),o.Class=t(11),o.Message=t(19),o.types=t(33),o.rpc=t(28),o.util=t(34),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40]); +!function t(e,r,n){function i(o,u){if(!r[o]){if(!e[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,r){for(var n,s=[],o=0,u=0;e>2],n=(3&a)<<4,u=1;break;case 1:s[o++]=i[n|a>>4],n=(15&a)<<2,u=2;break;case 2:s[o++]=i[n|a>>6],s[o++]=i[63&a],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(t,e,r){for(var n,i=r,o=0,a=0;a1)break;if(void 0===(f=s[f]))throw Error(u);switch(o){case 0:n=f,o=1;break;case 1:e[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:e[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:e[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i}},{}],3:[function(t,e,r){"use strict";function n(){function t(){for(var e=[],r=0;r ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return r[t]}))}for(var l=[],h=[],c=1,d=!1,p=0;p0?e.splice(--s,2):r?e.splice(s,1):++s:"."===e[s]?e.splice(s,1):++s;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=s(e)),i(e)?e:(r||(t=s(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?s(t+"/"+e):e)}},{}],9:[function(t,e,r){"use strict";function n(t,e,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return t(r);o+r>n&&(s=t(n),o=0);var u=e.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}e.exports=n},{}],10:[function(t,e,r){"use strict";var n=r;n.length=function(t){for(var e=0,r=0,n=0;n191&&i<224?o[u++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(t,e,r){for(var n,i,s=r,o=0;o>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-s}},{}],11:[function(t,e,r){"use strict";function n(t){return i(t)}function i(e,r){if(s||(s=t(32)),!(e instanceof s))throw a("type","a Type");if(r){if("function"!=typeof r)throw a("ctor","a function")}else r=function(t){return function(e){t.call(this,e)}}(o);r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=e,i.$type=e,e.getFieldsArray().forEach(function(t){i[t.name]=Array.isArray(t.resolve().defaultValue)?u.emptyArray:u.isObject(t.defaultValue)&&!t.long?u.emptyObject:t.defaultValue}),e.getOneofsArray().forEach(function(t){u.prop(i,t.resolve().name,{get:function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(t.oneof.indexOf(e[r])>-1)return e[r]},set:function(e){for(var r=t.oneof,n=0;n>>3){");for(var n=0;n>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function i(t){for(var e,r,i=t.getFieldsArray(),a=t.getOneofsArray(),f=u.codegen("m","w")("w||(w=Writer.create())"),e=0;e>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()",e,r):f("w.uint32(%d).%s(%s[ks[i]])",16|c,h,r),f("w.ldelim()")("}")("}")}else l.repeated?l.packed&&void 0!==o.packed[h]?f("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",h,r)("w.ldelim()",l.id)("}"):(f("if(%s)",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(f,l,e,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r)):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&util.longNe(%s,%d,%d))",r,r,l.defaultValue.low,l.defaultValue.high):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,e,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var e=0;e>>0,h,r),f("break;")}f("}")}return f("return w")}e.exports=i;var s=t(16),o=t(33),u=t(34)},{16:16,33:33,34:34}],16:[function(t,e,r){"use strict";function n(t,e,r){s.call(this,t,r),this.values=e||{},this.c=null}function i(t){return t.c=null,t}e.exports=n;var s=t(22),o=s.extend(n);n.className="Enum";var u=t(34),a=u.b;u.props(o,{valuesById:{get:function(){return this.c||(this.c={},Object.keys(this.values).forEach(function(t){var e=this.values[t];if(this.c[e])throw Error("duplicate id "+e+" in "+this);this.c[e]=t},this)),this.c}}}),n.testJSON=function(t){return Boolean(t&&t.values)},n.fromJSON=function(t,e){return new n(t,e.values,e.options)},o.toJSON=function(){return{options:this.options,values:this.values}},o.add=function(t,e){if(!u.isString(t))throw a("name");if(!u.isInteger(e)||e<0)throw a("id","a non-negative integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(void 0!==this.getValuesById()[e])throw Error("duplicate id "+e+" in "+this);return this.values[t]=e,i(this)},o.remove=function(t){if(!u.isString(t))throw a("name");if(void 0===this.values[t])throw Error("'"+t+"' is not a name of "+this);return delete this.values[t],i(this)}},{22:22,34:34}],17:[function(t,e,r){"use strict";function n(t,e,r,n,s,o){if(l.isObject(n)?(o=n,n=s=void 0):l.isObject(s)&&(o=s,s=void 0),i.call(this,t,o),!l.isInteger(e)||e<0)throw h("id","a non-negative integer");if(!l.isString(r))throw h("type");if(void 0!==s&&!l.isString(s))throw h("extend");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw h("rule","a valid rule string");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=e,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.d=null}e.exports=n;var i=t(22),s=i.extend(n);n.className="Field";var o,u,a=t(16),f=t(33),l=t(34),h=l.b;l.props(s,{packed:{get:s.isPacked=function(){return null===this.d&&(this.d=this.getOption("packed")!==!1),this.d}}}),s.setOption=function(t,e,r){return"packed"===t&&(this.d=null),i.prototype.setOption.call(this,t,e,r)},n.testJSON=function(t){return Boolean(t&&void 0!==t.id)},n.fromJSON=function(e,r){return void 0!==r.keyType?(u||(u=t(18)),u.fromJSON(e,r)):new n(e,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=f.defaults[this.type];if(void 0===e)if(o||(o=t(32)),this.resolvedType=this.parent.lookup(this.type,o))e=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);e=0}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:(this.options&&void 0!==this.options.default?this.defaultValue=this.options.default:this.defaultValue=e,this.long&&(this.defaultValue=l.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue))),i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(t,e,r){"use strict";function n(t,e,r,n,s){if(i.call(this,t,e,n,s),!a.isString(r))throw a.b("keyType");this.keyType=r,this.resolvedKeyType=null,this.map=!0}e.exports=n;var i=t(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=t(33),a=t(34);n.testJSON=function(t){return i.testJSON(t)&&void 0!==t.keyType},n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(t,e,r){"use strict";function n(t){if(t)for(var e=Object.keys(t),r=0;r0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return e&&r.addJSON(e),r},a.resolve=function(){f||(f=t(32)),l||(f=t(30));for(var e=this.getNestedArray(),r=0;r-1&&this.oneof.splice(e,1),t.parent&&t.parent.remove(t),t.partOf=null,this},o.onAdd=function(t){s.prototype.onAdd.call(this,t);var e=this;this.oneof.forEach(function(r){var n=t.get(r);n&&!n.partOf&&(n.partOf=e,e.i.push(n))}),i(this)},o.onRemove=function(t){this.i.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{17:17,22:22,34:34}],24:[function(t,e,r){"use strict";function n(t){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(t)}function i(t){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(t)}function s(t){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(t)}function o(t){return null===t?null:t.toLowerCase()}function u(t){return t.substring(0,1)+t.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(t,e){return e.toUpperCase()})}function a(t,e,r){function w(t,e){var r=a.filename;return a.filename=null,Error("illegal "+(e||"token")+" '"+t+"' ("+(r?r+", ":"")+"line "+Z.line()+")")}function k(){var t,e=[];do{if('"'!==(t=W())&&"'"!==t)throw w(t);e.push(W()),Q(t),t=G()}while('"'===t||"'"===t);return e.join("")}function x(t){var e=W();switch(o(e)){case"'":case'"':return X(e),k();case"true":return!0;case"false":return!1}try{return N(e)}catch(r){if(t&&i(e))return e;throw w(e,"value")}}function O(){var t=A(W()),e=t;return Q("to",!0)&&(e=A(W())),Q(";"),[t,e]}function N(t){var e=1;"-"===t.charAt(0)&&(e=-1,t=t.substring(1));var r=o(t);switch(r){case"inf":return e*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(t))return e*parseInt(t,10);if(/^0[x][0-9a-f]+$/.test(r))return e*parseInt(t,16);if(/^0[0-7]+$/.test(t))return e*parseInt(t,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return e*parseFloat(t);throw w(t,"number")}function A(t,e){var r=o(t);switch(r){case"max":return 536870911;case"0":return 0}if("-"===t.charAt(0)&&!e)throw w(t,"id");if(/^-?[1-9][0-9]*$/.test(t))return parseInt(t,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(t,16);if(/^-?0[0-7]+$/.test(t))return parseInt(t,8);throw w(t,"id")}function S(){if(void 0!==P)throw w("package");if(P=W(),!i(P))throw w(P,"name");rt=rt.define(P),Q(";")}function j(){var t,e=G();switch(e){case"weak":t=H||(H=[]),W();break;case"public":W();default:t=_||(_=[])}e=k(),Q(";"),t.push(e)}function T(){if(Q("="),K=o(k()),tt="proto3"===K,!tt&&"proto2"!==K)throw w(K,"syntax");Q(";")}function E(t,e){switch(e){case"option":return I(t,e),Q(";"),!0;case"message":return F(t,e),!0;case"enum":return V(t,e),!0;case"service":return C(t,e),!0;case"extend":return D(t,e),!0}return!1}function F(t,e){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(e=W());){var u=o(e);if(!E(s,e))switch(u){case"map":B(s,u);break;case"required":case"optional":case"repeated":J(s,u);break;case"oneof":L(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(O(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(O(s,u));break;default:if(!tt||!i(e))throw w(e);X(e),J(s,"optional")}}Q(";",!0)}else Q(";");t.add(s)}function J(t,e,r){var s=W();if("group"===o(s))return void q(t,e);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=nt(u),Q("=");var a=A(W()),f=M(new c(u,a,s,e,r));f.repeated&&void 0!==m.packed[s]&&!tt&&f.setOption("packed",!1,!0),t.add(f)}function q(t,e){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=A(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,e);for(Q("{");"}"!==(et=W());)switch(et=o(et)){case"option":I(u,et),Q(";");break;case"required":case"optional":case"repeated":J(u,et);break;default:throw w(et)}Q(";",!0),t.add(u).add(a)}function B(t){Q("<");var e=W();if(void 0===m.mapKey[e])throw w(e,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=nt(s),Q("=");var o=A(W()),u=M(new d(s,o,e,r));t.add(u)}function L(t,e){var r=W();if(!n(r))throw w(r,"name");r=nt(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(e=W());)"option"===e?(I(i,e),Q(";")):(X(e),J(i,"optional"));Q(";",!0)}else Q(";");t.add(i)}function V(t,e){var r=W();if(!n(r))throw w(r,"name");var i={},s=new v(r,i);if(Q("{",!0)){for(;"}"!==(e=W());)"option"===o(e)?(I(s,e),Q(";")):z(s,e);Q(";",!0)}else Q(";");t.add(s)}function z(t,e){if(!n(e))throw w(e,"name");var r=e;Q("=");var i=A(W(),!0);t.values[r]=i,M({})}function I(t,e){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",e=G(),s(e)&&(n+=e,W())),Q("="),$(t,n)}function $(t,e){if(Q("{",!0))for(;"}"!==(et=W());){if(!n(et))throw w(et,"name");e=e+"."+et,Q(":",!0)?R(t,e,x(!0)):$(t,e)}else R(t,e,x(!0))}function R(t,e,r){t.setOption?t.setOption(e,r):t[e]=r}function M(t){if(Q("[",!0)){do I(t,"option");while(Q(",",!0));Q("]")}return Q(";"),t}function C(t,e){if(e=W(),!n(e))throw w(e,"service name");var r=e,i=new y(r);if(Q("{",!0)){for(;"}"!==(e=W());){var s=o(e);switch(s){case"option":I(i,s),Q(";");break;case"rpc":U(i,s);break;default:throw w(e)}}Q(";",!0)}else Q(";");t.add(i)}function U(t,e){var r=e,s=W();if(!n(s))throw w(s,"name");var u,a,f,l;Q("(");var h;if(Q(h="stream",!0)&&(a=!0),!i(e=W()))throw w(e);if(u=e,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(e=W()))throw w(e);f=e,Q(")");var c=new g(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(e=W());){var d=o(e);switch(d){case"option":I(c,d),Q(";");break;default:throw w(e)}}Q(";",!0)}else Q(";");t.add(c)}function D(t,e){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(e=W());){var n=o(e);switch(n){case"required":case"repeated":case"optional":J(t,n,r);break;default:if(!tt||!i(e))throw w(e);X(e),J(t,"optional",r)}}Q(";",!0)}else Q(";")}e instanceof l?r||(r={}):(e=new l,r=e||{});var P,_,H,K,Z=f(t),W=Z.next,X=Z.push,G=Z.peek,Q=Z.skip,Y=!0,tt=!1;e||(e=new l);for(var et,rt=e,nt=r.keepCase?function(t){return t}:u;null!==(et=W());){var it=o(et);switch(it){case"package":if(!Y)throw w(et);S();break;case"import":if(!Y)throw w(et);j();break;case"syntax":if(!Y)throw w(et);T();break;case"option":if(!Y)throw w(et);I(rt,et),Q(";");break;default:if(E(rt,et)){Y=!1;continue}throw w(et)}}return a.filename=null,{package:P,imports:_,weakImports:H,syntax:K,root:e}}e.exports=a;var f=t(31),l=t(27),h=t(32),c=t(17),d=t(18),p=t(23),v=t(16),y=t(30),g=t(20),m=t(33),b=t(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(t,e,r){"use strict";function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function i(t){this.buf=t,this.pos=0,this.len=t.length}function s(){var t=new k(0,0),e=0;if(this.len-this.pos>4){for(e=0;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(e=0;e<4;++e){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(e=0;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t; +}else for(e=0;e<5;++e){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function a(){return s.call(this).toLong(!0)}function f(){return s.call(this).toNumber(!0)}function l(){return s.call(this).zzDecode().toLong()}function h(){return s.call(this).zzDecode().toNumber()}function c(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new k(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(){w.Long?(O.int64=o,O.uint64=a,O.sint64=l,O.fixed64=p,O.sfixed64=y):(O.int64=u,O.uint64=f,O.sint64=h,O.fixed64=v,O.sfixed64=g)}e.exports=i;var b,w=t(36),k=w.LongBits,x=w.utf8;i.create=w.Buffer?function(e){return b||(b=t(26)),(i.create=function(t){return new b(t)})(e)}:function(t){return new i(t)};var O=i.prototype;O.j=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},O.bool=function(){return 0!==this.uint32()},O.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},O.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var N="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],t[0]}:function(r,n){return e[3]=r[n],e[2]=r[n+1],e[1]=r[n+2],e[0]=r[n+3],t[0]}}():function(t,e){var r=c(t,e+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};O.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=N(this.buf,this.pos);return this.pos+=4,t};var A="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],e[4]=r[n+4],e[5]=r[n+5],e[6]=r[n+6],e[7]=r[n+7],t[0]}:function(r,n){return e[7]=r[n],e[6]=r[n+1],e[5]=r[n+2],e[4]=r[n+3],e[3]=r[n+4],e[2]=r[n+5],e[1]=r[n+6],e[0]=r[n+7],t[0]}}():function(t,e){var r=c(t,e+4),n=c(t,e+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};O.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=8,t},O.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw n(this,t);return this.pos+=t,e===r?new this.buf.constructor(0):this.j.call(this.buf,e,r)},O.string=function(){var t=this.bytes();return x.read(t,0,t.length)},O.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},i.k=m,m()},{26:26,36:36}],26:[function(t,e,r){"use strict";function n(t){i.call(this,t)}e.exports=n;var i=t(25),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=t(36);o.Buffer&&(s.j=o.Buffer.prototype.slice),s.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{25:25,36:36}],27:[function(t,e,r){"use strict";function n(t){o.call(this,"",t),this.deferred=[],this.files=[]}function i(){}function s(t){var e=t.parent.lookup(t.extend);if(e){var r=new l(t.getFullName(),t.id,t.type,t.rule,(void 0),t.options);return r.declaringField=t,t.extensionField=r,e.add(r),!0}return!1}e.exports=n;var o=t(21),u=o.extend(n);n.className="Root";var a,f,l=t(17),h=t(34);n.fromJSON=function(t,e){return e||(e=new n),e.setOptions(t.options).addJSON(t.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=t(24),f=t(12)}catch(t){}c=null};u.load=function t(e,r,n){function s(t,e){if(n){var r=n;n=null,r(t,e)}}function o(t,e){try{if(h.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),h.isString(e)){a.filename=t;var n=a(e,l,r);n.imports&&n.imports.forEach(function(e){u(l.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){u(l.resolvePath(t,e),!0)})}else l.setOptions(e.options).addJSON(e.nested)}catch(t){return void s(t)}d||p||s(null,l)}function u(t,e){var r=t.lastIndexOf("google/protobuf/");if(r>-1){var i=t.substring(r);i in f&&(t=i)}if(!(l.files.indexOf(t)>-1)){if(l.files.push(t),t in f)return void(d?o(t,f[t]):(++p,setTimeout(function(){--p,o(t,f[t])})));if(d){var u;try{u=h.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||s(t))}o(t,u)}else++p,h.fetch(t,function(r,i){if(--p,n)return r?void(e||s(r)):void o(t,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(t,l,e);var d=n===i,p=0;return h.isString(e)&&(e=[e]),e.forEach(function(t){u(l.resolvePath("",t))}),d?l:void(p||s(null,l))},u.loadSync=function(t,e){return this.load(t,e,i)},u.g=function(t){var e=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof o)for(var r=t.getNestedArray(),n=0;n0)return v.shift();if(y)return r();var n,o,u;do{if(c===d)return null;for(n=!1;/\s/.test(u=i(c));)if("\n"===u&&++p,++c===d)return null;if("/"===i(c)){if(++c===d)throw e("comment");if("/"===i(c)){for(;"\n"!==i(++c);)if(c===d)return null;++c,++p,n=!0}else{if("*"!==(u=i(c)))return"/";do{if("\n"===u&&++p,++c===d)return null;o=u,u=i(c)}while("*"!==o||"/"!==u);++c,n=!0}}}while(n);if(c===d)return null;var a=c;s.lastIndex=0;var f=s.test(i(a++));if(!f)for(;a]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],32:[function(t,e,r){"use strict";function n(t,e){s.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.m=null,this.i=null,this.n=null,this.o=null,this.p=null}function i(t){return t.m=t.i=t.o=t.p=null,delete t.encode,delete t.decode,delete t.verify,t}e.exports=n;var s=t(21),o=s.prototype,u=s.extend(n);n.className="Type";var a,f,l,h=t(16),c=t(23),d=t(17),p=t(30),v=t(11),y=t(19),g=t(25),m=t(38),b=t(13),w=t(34);w.props(u,{fieldsById:{get:function(){if(this.m)return this.m;this.m={};for(var t=Object.keys(this.fields),e=0;e>>0,i=(t-r)/4294967296>>>0;return e&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if("string"==typeof t){if(!i.Long)return n.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;n.fromHash=function(t){return t===u?o:new n((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{36:36}],36:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(35),util.base64=require(2),util.inquire=require(7),util.utf8=require(10),util.pool=require(9),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,r){return new t(e,r)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():util.LongBits.zeroHash},util.longFromHash=function(t,e){var r=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},util.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=util.LongBits.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=util.LongBits.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},util.longNe=function(t,e,r){if("object"==typeof t)return t.low!==e||t.high!==r;var n=util.LongBits.from(t);return n.lo!==e||n.hi!==r},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,e){Object.keys(e).forEach(function(r){util.prop(t,r,e[r])})},util.prop=function(t,e,r){var n=util.ucFirst(e);r.get&&(t["get"+n]=r.get),r.set&&(t["set"+n]=util.isIE8?function(t){r.set.call(this,t),this[e]=t}:r.set),util.isIE8?void 0!==r.value&&(t[e]=r.value):Object.defineProperty(t,e,r)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,35:35,7:7,9:9}],37:[function(t,e,r){"use strict";function n(t,e){return"invalid value for field "+t.getFullName()+" ("+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected)"}function i(t,e,r,i){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",i)("default:")("return%j",n(e,"enum value"));for(var s=f.toArray(e.resolvedType.values),o=0;o127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function f(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function l(t,e,r){e[r++]=255&t,e[r++]=t>>>8&255,e[r++]=t>>>16&255,e[r]=t>>>24}e.exports=o;var h,c=t(36),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=t(39)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},y.uint32=function(t){return t>>>=0,this.push(a,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},y.int32=function(t){return t<0?this.push(f,10,d.fromNumber(t)):this.uint32(t)},y.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},y.uint64=function(t){var e=d.from(t);return this.push(f,e.length(),e)},y.int64=y.uint64,y.sint64=function(t){var e=d.from(t).zzEncode();return this.push(f,e.length(),e)},y.bool=function(t){return this.push(u,1,t?1:0)},y.fixed32=function(t){return this.push(l,4,t>>>0)},y.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},y.fixed64=function(t){var e=d.from(t);return this.push(l,4,e.lo).push(l,4,e.hi)},y.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(l,4,e.lo).push(l,4,e.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i]=e[3]}:function(r,n,i){t[0]=r,n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)l(1/t>0?0:2147483648,e,r);else if(isNaN(t))l(2147483647,e,r);else if(t>3.4028234663852886e38)l((n<<31|2139095040)>>>0,e,r);else if(t<1.1754943508222875e-38)l((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,r);else{var i=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,e,r)}};y.float=function(t){return this.push(g,4,t)};var m="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i]=e[7]}:function(r,n,i){t[0]=r,n[i++]=e[7],n[i++]=e[6],n[i++]=e[5],n[i++]=e[4],n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)l(0,e,r),l(1/t>0?0:2147483648,e,r+4);else if(isNaN(t))l(4294967295,e,r),l(2147483647,e,r+4);else if(t>1.7976931348623157e308)l(0,e,r),l((n<<31|2146435072)>>>0,e,r+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,l(i>>>0,e,r),l((n<<31|i/4294967296)>>>0,e,r+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),i=t*Math.pow(2,-s),l(4503599627370496*i>>>0,e,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,e,r+4)}}};y.double=function(t){return this.push(m,8,t)};var b=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n>>0;if("string"==typeof t&&e){var r=o.alloc(e=p.length(t));p.decode(t,r,0),t=r}return e?this.uint32(e).push(b,e,t):this.push(u,1,0)},y.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new n(i,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=e,this.len+=r,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e}},{36:36,39:39}],39:[function(t,e,r){"use strict";function n(){s.call(this)}function i(t,e,r){t.length<40?a.write(t,e,r):e.utf8Write(t,r)}e.exports=n;var s=t(38),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=t(36),a=u.utf8,f=u.Buffer;n.alloc=function(t){return(n.alloc=f.allocUnsafe)(t)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){t.copy(e,r,0,t.length)};o.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(l,e,t),this},o.string=function(t){var e=f.byteLength(t);return this.uint32(e),e&&this.push(i,e,t),this}},{36:36,38:38}],40:[function(t,e,r){(function(e){"use strict";function n(t,e,r){return"function"==typeof e?(r=e,e=new o.Root):e||(e=new o.Root),e.load(t,r)}function i(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.k()}var o=e.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=t(31),o.parse=t(24),o.common=t(12)}catch(t){}o.Writer=t(38),o.BufferWriter=t(39),o.Reader=t(25),o.BufferReader=t(26),o.encoder=t(15),o.decoder=t(14),o.verifier=t(37),o.ReflectionObject=t(22),o.Namespace=t(21),o.Root=t(27),o.Enum=t(16),o.Type=t(32),o.Field=t(17),o.OneOf=t(23),o.MapField=t(18),o.Service=t(30),o.Method=t(20),o.Class=t(11),o.Message=t(19),o.types=t(33),o.rpc=t(28),o.util=t(34),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/protobuf.min.js.gz b/dist/protobuf.min.js.gz index 82cf78bf2744971c5623396e328dd61a69638854..875d7d78486fd3b6b51caa898810ea644bdce6e8 100644 GIT binary patch literal 17793 zcmV(qK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\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(19),\r\n util = require(34);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(32);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n * @property {Object} google/protobuf/wrappers.proto Wrappers\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"wrappers\", {\r\n DoubleValue: {\r\n fields: {\r\n value: {\r\n type: \"double\",\r\n id: 1\r\n }\r\n }\r\n },\r\n FloatValue: {\r\n fields: {\r\n value: {\r\n type: \"float\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int64Value: {\r\n fields: {\r\n value: {\r\n type: \"int64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt64Value: {\r\n fields: {\r\n value: {\r\n type: \"uint64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int32Value: {\r\n fields: {\r\n value: {\r\n type: \"int32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt32Value: {\r\n fields: {\r\n value: {\r\n type: \"uint32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BoolValue: {\r\n fields: {\r\n value: {\r\n type: \"bool\",\r\n id: 1\r\n }\r\n }\r\n },\r\n StringValue: {\r\n fields: {\r\n value: {\r\n type: \"string\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BytesValue: {\r\n fields: {\r\n value: {\r\n type: \"bytes\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(16),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(32);\r\n Message = require(19);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0)\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(18);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(32);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(17);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(13);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @extends {Object}\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @abstract\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(32),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(16),\r\n Field = require(17),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(30);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(34);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(31),\r\n Root = require(27),\r\n Type = require(32),\r\n Field = require(17),\r\n MapField = require(18),\r\n OneOf = require(23),\r\n Enum = require(16),\r\n Service = require(30),\r\n Method = require(20),\r\n types = require(33),\r\n util = require(34);\r\n\r\nfunction isName(token) {\r\n return /^[a-zA-Z_][a-zA-Z_0-9]*$/.test(token);\r\n}\r\n\r\nfunction isTypeRef(token) {\r\n return /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction isFqTypeRef(token) {\r\n return /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Options modifying the behavior of {@link parse}.\r\n * @typedef ParseOptions\r\n * @type {Object}\r\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {Root} root Root to populate\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @property {string} filename=null Currently processing file name for error reporting, if known\r\n */\r\nfunction parse(source, root, options) {\r\n /* eslint-disable callback-return */\r\n if (!(root instanceof Root)) {\r\n root = new Root();\r\n options = root || {};\r\n } else if (!options)\r\n options = {};\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n var applyCase = options.keepCase ? function(name) { return name; } : camelCase;\r\n\r\n function illegal(token, name) {\r\n var filename = parse.filename;\r\n parse.filename = null;\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line() + \")\");\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === \"\\\"\" || token === \"'\");\r\n return values.join(\"\");\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case \"'\":\r\n case \"\\\"\":\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && isTypeRef(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(\";\");\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === \"-\") {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, \"number\");\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"max\": return 536870911;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === \"-\" && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!isTypeRef(pkg))\r\n throw illegal(pkg, \"name\");\r\n ptr = ptr.define(pkg);\r\n skip(\";\");\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(\";\");\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n isProto3 = syntax === \"proto3\";\r\n if (!isProto3 && syntax !== \"proto2\")\r\n throw illegal(syntax, \"syntax\");\r\n skip(\";\");\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case \"option\":\r\n parseOption(parent, token);\r\n skip(\";\");\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, tokenLower);\r\n break;\r\n\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n default:\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, \"optional\");\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (lower(type) === \"group\") {\r\n parseGroup(parent, rule);\r\n return;\r\n }\r\n if (!isTypeRef(type))\r\n throw illegal(type, \"type\");\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\r\n // parsing proto2 descriptors without the option, where applicable.\r\n if (field.repeated && types.packed[type] !== undefined && !isProto3)\r\n field.setOption(\"packed\", false, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseGroup(parent, rule) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var fieldName = util.lcFirst(name);\r\n if (name === fieldName)\r\n name = util.ucFirst(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var type = new Type(name);\r\n type.group = true;\r\n var field = new Field(fieldName, id, name, rule);\r\n skip(\"{\");\r\n while ((token = next()) !== \"}\") {\r\n switch (token = lower(token)) {\r\n case \"option\":\r\n parseOption(type, token);\r\n skip(\";\");\r\n break;\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, token);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token); // there are no groups with proto3 semantics\r\n }\r\n }\r\n skip(\";\", true);\r\n parent.add(type).add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n\r\n /* istanbul ignore next */\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, \"type\");\r\n skip(\",\");\r\n var valueType = next();\r\n /* istanbul ignore next */\r\n if (!isTypeRef(valueType))\r\n throw illegal(valueType, \"type\");\r\n skip(\">\");\r\n var name = next();\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (token === \"option\") {\r\n parseOption(oneof, token);\r\n skip(\";\");\r\n } else {\r\n push(token);\r\n parseField(oneof, \"optional\");\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (lower(token) === \"option\") {\r\n parseOption(enm, token);\r\n skip(\";\");\r\n } else\r\n parseEnumField(enm, token);\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(\"(\", true);\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(name))\r\n throw illegal(name, \"name\");\r\n\r\n if (custom) {\r\n skip(\")\");\r\n name = \"(\" + name + \")\";\r\n token = peek();\r\n if (isFqTypeRef(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, \"option\");\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(\";\");\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"service name\");\r\n\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(service, tokenLower);\r\n skip(\";\");\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(\"(\");\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(\")\"); skip(\"returns\"); skip(\"(\");\r\n if (skip(st, true))\r\n responseStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n\r\n responseType = token;\r\n skip(\")\");\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(method, tokenLower);\r\n skip(\";\");\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(reference))\r\n throw illegal(reference, \"reference\");\r\n\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"required\":\r\n case \"repeated\":\r\n case \"optional\":\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n /* istanbul ignore next */\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, \"optional\", reference);\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case \"option\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(\";\");\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n /* istanbul ignore next */\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n parse.filename = null;\r\n return {\r\n \"package\" : pkg,\r\n \"imports\" : imports,\r\n weakImports : weakImports,\r\n syntax : syntax,\r\n root : root\r\n };\r\n}\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @name parse\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @variation 2\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(36);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(26);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(25);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(24);\r\n common = require(12);\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(29);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(34);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(20),\r\n util = require(34),\r\n rpc = require(28);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n/**/\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable callback-return */\r\n source = source.toString();\r\n\r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n\r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /* istanbul ignore next */\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === \"/\") {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === \"/\") { // Line\r\n while (charAt(++offset) !== \"\\n\")\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\r\n do {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== \"*\" || curr !== \"/\");\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return \"/\";\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === \"\\\"\" || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(16),\r\n OneOf = require(23),\r\n Field = require(17),\r\n Service = require(30),\r\n Class = require(11),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(38),\r\n convert = require(13),\r\n util = require(34);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(15);\r\n decoder = require(14);\r\n verifier = require(37);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(34);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(36);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(16),\r\n Type = require(32),\r\n util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(38);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(36);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/index.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/codegen/index.js","node_modules/@protobufjs/eventemitter/index.js","node_modules/@protobufjs/extend/index.js","node_modules/@protobufjs/fetch/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/path/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","src/class.js","src/common.js","src/convert.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/mapfield.js","src/message.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/reader.js","src/reader_buffer.js","src/root.js","src/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/writer_buffer.js","src/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","asPromise","fn","ctx","params","arguments","push","pending","Promise","resolve","reject","err","args","apply","this","base64","string","p","charAt","Math","ceil","b64","Array","s64","encode","buffer","start","end","j","b","String","fromCharCode","invalidEncoding","decode","offset","c","charCodeAt","undefined","codegen","gen","line","sprintf","level","indent","src","prev","blockOpenRe","test","branchRe","casingRe","inCase","breakRe","blockCloseRe","str","name","replace","join","eof","scope","source","verbose","console","log","keys","Object","Function","concat","map","key","format","$0","$1","arg","JSON","stringify","supported","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","listeners","splice","emit","extend","ctor","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","isAbsolute","normalize","parts","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","pool","alloc","slice","size","SIZE","MAX","slab","buf","utf8","len","read","chunk","write","c1","c2","Class","type","Type","TypeError","MessageCtor","properties","Message","util","merge","$type","getFieldsArray","forEach","field","isArray","defaultValue","emptyArray","isObject","long","emptyObject","getOneofsArray","oneof","prop","get","indexOf","set","value","setCtor","_TypeError","common","json","nested","google","protobuf","Any","fields","type_url","id","timeType","Duration","seconds","nanos","Timestamp","Empty","Struct","keyType","Value","oneofs","kind","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","values","NULL_VALUE","ListValue","rule","DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue","convert","destination","options","converter","defaults","repeated","fieldsOnly","Enum","toJson","enums","resolvedType","getValuesById","longs","unsigned","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","Buffer","isBuffer","toMessage","getCtor","fromString","newBuffer","decoder","mtype","group","ref","safeProp","resolvedKeyType","types","basic","packed","genEncodeType","fieldIndex","encoder","wireType","mapKey","partOf","required","low","high","ucName","oneofFields","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","className","props","valuesById","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","toLowerCase","optional","message","extensionField","declaringField","_packed","FieldPrototype","MapField","isPacked","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","_nestedArray","_clearProperties","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","getNestedArray","nestedJson","ns","nestedName","getEnum","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","getRoot","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","root","fullName","getFullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucFirst","_fieldsArray","addFieldsToParent","OneOfPrototype","index","self","fieldName","isName","token","isTypeRef","isFqTypeRef","lower","camelCase","substring","toUpperCase","parse","illegal","filename","tn","readString","next","skip","peek","readValue","acceptTypeRef","parseNumber","readRange","parseId","sign","tokenLower","Infinity","NaN","parseInt","parseFloat","acceptNegative","parsePackage","pkg","parseImport","whichImports","weakImports","imports","parseSyntax","syntax","isProto3","parseCommon","parseOption","parseType","parseEnum","parseService","parseExtension","parseMapField","parseField","parseOneOf","extensions","reserved","parseGroup","applyCase","parseInlineOptions","lcFirst","valueType","parseEnumField","custom","parseOptionValue","service","parseMethod","st","method","reference","tokenize","head","keepCase","package","indexOutOfRange","reader","writeLength","RangeError","pos","Reader","readLongVarint","bits","lo","hi","read_int64_long","toLong","read_int64_number","read_uint64_long","read_uint64_number","read_sint64_long","zzDecode","read_sint64_number","readFixed32","readFixed64","read_fixed64_long","read_fixed64_number","read_sfixed64_long","read_sfixed64_number","configure","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","BufferReader","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","exponent","mantissa","pow","float","readDouble","Float64Array","f64","double","skipType","_configure","BufferReaderPrototype","utf8Slice","min","deferred","files","SYNC","handleExtension","extendedType","sisterField","RootPrototype","resolvePath","initParser","load","finish","cb","process","parsed","sync","queued","weak","idx","lastIndexOf","altname","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","methodsArray","methodName","inherited","getMethodsArray","requestDelimited","responseDelimited","rpcService","request","requestData","setImmediate","responseData","response","err2","unescape","subject","re","stringDelim","stringSingleRe","stringDoubleRe","lastIndex","match","exec","stack","repeat","curr","delimRe","delim","expected","actual","equals","_fieldsById","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","verifier","Writer","fieldsById","names","fieldsArray","repeatedFieldsArray","filter","oneofsArray","oneOfName","getFieldsById","setup","fld","fork","ldelim","bake","description","dst","allocUnsafe","LongBitsPrototype","zero","zzEncode","zeroHash","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","isIE8","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","longNeq","longNe","val","target","descriptors","descriptor","ucKey","defineProperty","invalid","genVerifyValue","genVerifyKey","Op","noop","State","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","BufferWriter","WriterPrototype","writeFloat","isNaN","round","LN2","writeDouble","writeBytes","reset","writeStringBuffer","BufferWriterPrototype","writeBytesBuffer","copy","byteLength","roots","amd"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAA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=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = [];\r\n for (var i = 2; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n var pending = true;\r\n return new Promise(function asPromiseExecutor(resolve, reject) {\r\n params.push(function asPromiseCallback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var args = [];\r\n for (var i = 1; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n resolve.apply(null, args);\r\n }\r\n }\r\n });\r\n try {\r\n fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * A closure for generating functions programmatically.\r\n * @memberof util\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {Codegen} Codegen instance\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen() {\r\n var params = [],\r\n src = [],\r\n indent = 1,\r\n inCase = false;\r\n for (var i = 0; i < arguments.length;)\r\n params.push(arguments[i++]);\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {Codegen} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var args = [],\r\n i = 0;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n var line = sprintf.apply(null, args);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (i = 0; i < level; ++i)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n * @inner\r\n */\r\n function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\", \") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n }\r\n\r\n gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === \"object\") {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\nfunction sprintf(format) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n i = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var arg = args[i++];\r\n switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(arg);\r\n default:\r\n return String(arg);\r\n }\r\n });\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\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.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\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 {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nEventEmitterPrototype.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\nmodule.exports = extend;\r\n\r\n/**\r\n * Lets the specified constructor extend `this` class.\r\n * @memberof util\r\n * @param {*} ctor Extending constructor\r\n * @returns {Object} Constructor prototype\r\n * @this Function\r\n */\r\nfunction extend(ctor) {\r\n // copy static members\r\n var keys = Object.keys(this);\r\n for (var i = 0; i < keys.length; ++i)\r\n ctor[keys[i]] = this[keys[i]];\r\n // properly extend\r\n var prototype = ctor.prototype = Object.create(this.prototype);\r\n prototype.constructor = ctor;\r\n return prototype;\r\n}\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} [callback] Callback function\r\n * @returns {Promise|undefined} A Promise if `callback` has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, this, path); // eslint-disable-line no-invalid-this\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch_xhr(path, callback)\r\n : callback(err, contents);\r\n });\r\n return fetch_xhr(path, callback);\r\n}\r\n\r\nfunction fetch_xhr(path, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n return xhr.readyState === 4\r\n ? xhr.status === 0 || xhr.status === 200\r\n ? callback(null, xhr.responseText)\r\n : callback(Error(\"status \" + xhr.status))\r\n : undefined;\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n };\r\n xhr.open(\"GET\", path);\r\n xhr.send();\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 path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\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\";\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 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(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 i ? 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(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 = Class;\r\n\r\nvar Message = require(19),\r\n util = require(34);\r\n\r\nvar Type; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a class instance, which is also a message prototype.\r\n * @classdesc Runtime class providing the tools to create your own custom classes.\r\n * @constructor\r\n * @param {Type} type Reflected type\r\n */\r\nfunction Class(type) {\r\n return create(type);\r\n}\r\n\r\n/**\r\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\r\n * @memberof Class\r\n * @param {Type} type Reflected message type\r\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\r\n * @returns {Message} Message prototype\r\n */\r\nfunction create(type, ctor) {\r\n if (!Type)\r\n Type = require(32);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type\", \"a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor\", \"a function\");\r\n } else\r\n ctor = (function(MessageCtor) {\r\n return function Message(properties) {\r\n MessageCtor.call(this, properties);\r\n };\r\n })(Message);\r\n\r\n // Let's pretend...\r\n ctor.constructor = Class;\r\n\r\n // new Class() -> Message.prototype\r\n var prototype = ctor.prototype = new Message();\r\n prototype.constructor = ctor;\r\n\r\n // Static methods on Message are instance methods on Class and vice versa.\r\n util.merge(ctor, Message, true);\r\n\r\n // Classes and messages reference their reflected type\r\n ctor.$type = type;\r\n prototype.$type = type;\r\n\r\n // Messages have non-enumerable default values on their prototype\r\n type.getFieldsArray().forEach(function(field) {\r\n // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.resolve().defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue) && !field.long\r\n ? util.emptyObject\r\n : field.defaultValue;\r\n });\r\n\r\n // Messages have non-enumerable getters and setters for each virtual oneof field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(value) {\r\n for (var keys = oneof.oneof, i = 0; i < keys.length; ++i)\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n // see util.prop for IE8 support\r\n });\r\n });\r\n\r\n // Register\r\n type.setCtor(ctor);\r\n\r\n return prototype;\r\n}\r\n\r\nClass.create = create;\r\n\r\n// Static methods on Message are instance methods on Class and vice versa.\r\nClass.prototype = Message;\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @name Class#encode\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @name Class#encodeDelimited\r\n * @function\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Class#decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Class#decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Class#verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object.} google/protobuf/any.proto Any\r\n * @property {Object.} google/protobuf/duration.proto Duration\r\n * @property {Object.} google/protobuf/empty.proto Empty\r\n * @property {Object.} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object.} google/protobuf/timestamp.proto Timestamp\r\n * @property {Object.} google/protobuf/wrappers.proto Wrappers\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"wrappers\", {\r\n DoubleValue: {\r\n fields: {\r\n value: {\r\n type: \"double\",\r\n id: 1\r\n }\r\n }\r\n },\r\n FloatValue: {\r\n fields: {\r\n value: {\r\n type: \"float\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int64Value: {\r\n fields: {\r\n value: {\r\n type: \"int64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt64Value: {\r\n fields: {\r\n value: {\r\n type: \"uint64\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Int32Value: {\r\n fields: {\r\n value: {\r\n type: \"int32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n UInt32Value: {\r\n fields: {\r\n value: {\r\n type: \"uint32\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BoolValue: {\r\n fields: {\r\n value: {\r\n type: \"bool\",\r\n id: 1\r\n }\r\n }\r\n },\r\n StringValue: {\r\n fields: {\r\n value: {\r\n type: \"string\",\r\n id: 1\r\n }\r\n }\r\n },\r\n BytesValue: {\r\n fields: {\r\n value: {\r\n type: \"bytes\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});","\"use strict\";\r\nmodule.exports = convert;\r\n\r\nvar Enum = require(16),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Message;\r\n\r\n/**\r\n * A converter as used by {@link convert}.\r\n * @typedef Converter\r\n * @type {function}\r\n * @param {Field} field Reflected field\r\n * @param {*} value Value to convert\r\n * @param {Object.} options Conversion options\r\n * @returns {*} Converted value\r\n */\r\n\r\n/**\r\n * Converts between JSON objects and messages, based on reflection information.\r\n * @param {Type} type Type\r\n * @param {*} source Source object\r\n * @param {*} destination Destination object\r\n * @param {Object.} options Conversion options\r\n * @param {Converter} converter Conversion function\r\n * @returns {*} `destination`\r\n * @property {Converter} toJson To JSON converter using {@link JSONConversionOptions}\r\n * @property {Converter} toMessage To message converter using {@link MessageConversionOptions}\r\n */\r\nfunction convert(type, source, destination, options, converter) {\r\n\r\n if (!Type) { // require this here already so it is available within the converters below\r\n Type = require(32);\r\n Message = require(19);\r\n }\r\n\r\n if (!options)\r\n options = {};\r\n\r\n var keys = Object.keys(options.defaults ? type.fields : source);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = type.fields[key = keys[i]],\r\n value = source[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value || options.defaults) {\r\n destination[key] = [];\r\n if (value)\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n destination[key].push(converter(field, value[j], options));\r\n }\r\n } else\r\n destination[key] = converter(field, value, options);\r\n } else if (!options.fieldsOnly)\r\n destination[key] = value;\r\n }\r\n return destination;\r\n}\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON} with {@link convert}.\r\n * @typedef JSONConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n * @property {*} [longs] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @property {*} [enums=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @property {*} [bytes] Bytes value conversion type.\r\n * Valid values are `Array` and `String` (the global types).\r\n * Defaults to return the underlying buffer type.\r\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\r\n */\r\n/**/\r\nconvert.toJson = function toJson(field, value, options) {\r\n if (!options)\r\n options = {};\r\n\r\n // Recurse into inner messages\r\n if (value instanceof Message)\r\n return convert(value.$type, value, {}, options, toJson);\r\n\r\n // Enums as strings\r\n if (options.enums && field.resolvedType instanceof Enum)\r\n return options.enums === String\r\n ? field.resolvedType.getValuesById()[value]\r\n : value | 0;\r\n\r\n // Longs as numbers or strings\r\n if (options.longs && field.long) {\r\n var unsigned = field.type.charAt(0) === \"u\";\r\n if (options.longs === Number)\r\n return typeof value === \"number\"\r\n ? value\r\n : util.LongBits.from(value).toNumber(unsigned);\r\n if (options.longs === String) {\r\n if(typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned).toString();\r\n value = util.Long.fromValue(value); // has no unsigned option\r\n value.unsigned = unsigned;\r\n return value.toString();\r\n }\r\n }\r\n\r\n // Bytes as base64 strings, plain arrays or buffers\r\n if (options.bytes && field.bytes) {\r\n if (options.bytes === String)\r\n return util.base64.encode(value, 0, value.length);\r\n if (options.bytes === Array)\r\n return Array.prototype.slice.call(value);\r\n if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))\r\n return util.Buffer.from(value); // polyfilled\r\n }\r\n return value;\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from} with {@link convert}.\r\n * @typedef MessageConversionOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Keeps only properties that reference a field\r\n */\r\n/**/\r\nconvert.toMessage = function toMessage(field, value, options) {\r\n switch (typeof value) {\r\n\r\n // Recurse into inner messages\r\n case \"object\":\r\n if (value) {\r\n if (field.resolvedType instanceof Type)\r\n return convert(field.resolvedType, value, new (field.resolvedType.getCtor())(), options, toMessage);\r\n if (field.type === \"bytes\")\r\n return util.Buffer\r\n ? util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value) // polyfilled\r\n : value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n break;\r\n\r\n // Strings to proper numbers, longs or buffers\r\n case \"string\":\r\n if (field.resolvedType instanceof Enum)\r\n return field.resolvedType.values[value] || 0;\r\n if (field.long)\r\n return util.Long.fromString(value, field.type.charAt(0) === \"u\");\r\n if (field.bytes) {\r\n var buf = util.newBuffer(util.base64.length(value));\r\n util.base64.decode(value, buf, 0);\r\n return buf;\r\n }\r\n break;\r\n\r\n // Numbers to proper longs\r\n case \"number\":\r\n if (field.long)\r\n return util.Long.fromNumber(value, field.type.charAt(0) === \"u\");\r\n break;\r\n\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction decoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos>>3){\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case %d:\", field.id);\r\n\r\n // Map fields\r\n if (field.map) {\r\n\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"r.skip().pos++\") // assumes id 1 + key wireType\r\n (\"if(%s===util.emptyObject)\", ref)\r\n (\"%s={}\", ref)\r\n (\"var k=r.%s()\", keyType)\r\n (\"if(typeof k===\\\"object\\\")\")\r\n (\"k=util.longToHash(k)\")\r\n (\"r.pos++\"); // assumes id 2 + value wireType\r\n if (types.basic[type] === undefined) gen\r\n (\"%s[k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\r\n else gen\r\n (\"%s[k]=r.%s()\", ref, type);\r\n\r\n // Repeated fields\r\n } else if (field.repeated) { gen\r\n\r\n (\"%s&&%s.length||(%s=[])\", ref, ref, ref);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined) gen\r\n (\"if((t&7)===2){\")\r\n (\"var e=r.uint32()+r.pos\")\r\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\r\n : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\r\n}\r\n\r\n/**\r\n * Generates an encoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction encoder(mtype) {\r\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n var fields = mtype.getFieldsArray();\r\n var oneofs = mtype.getOneofsArray();\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"w||(w=Writer.create())\");\r\n\r\n var i, ref;\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType;\r\n gen\r\n (\"if(%s&&%s!==util.emptyObject){\", ref, ref)\r\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[keyType], keyType);\r\n if (wireType === undefined) gen\r\n (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\"w.uint32(%d).%s(%s[ks[i]])\", 16 | wireType, type, ref);\r\n gen\r\n (\"w.ldelim()\")\r\n (\"}\")\r\n (\"}\");\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n\r\n // Packed repeated\r\n if (field.packed && types.packed[type] !== undefined) { gen\r\n\r\n (\"if(%s&&%s.length){\", ref, ref)\r\n (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\r\n (\"for(var i=0;i<%s.length;++i)\", ref)\r\n (\"w.%s(%s[i])\", type, ref)\r\n (\"w.ldelim()\", field.id)\r\n (\"}\");\r\n\r\n // Non-packed\r\n } else { gen\r\n\r\n (\"if(%s)\", ref)\r\n (\"for(var i=0;i<%s.length;++i)\", ref);\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref + \"[i]\");\r\n else gen\r\n (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n\r\n // Non-repeated\r\n } else if (!field.partOf) {\r\n if (!field.required) {\r\n\r\n if (field.long) {\r\n gen\r\n (\"if(%s!==undefined&&util.longNe(%s,%d,%d))\", ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n } else gen\r\n (\"if(%s!==undefined&&%s!==%j)\", ref, ref, field.defaultValue);\r\n\r\n }\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, i, ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n }\r\n }\r\n for (var i = 0; i < oneofs.length; ++i) {\r\n var oneof = oneofs[i];\r\n gen\r\n (\"switch(%s){\", \"m.get\" + oneof.ucName + \"()\");\r\n var oneofFields = oneof.getFieldsArray();\r\n for (var j = 0; j < oneofFields.length; ++j) {\r\n var field = oneofFields[j],\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\r\n wireType = types.basic[type];\r\n ref = \"m\" + util.safeProp(field.name);\r\n gen\r\n (\"case%j:\", field.name);\r\n\r\n if (wireType === undefined)\r\n genEncodeType(gen, field, fields.indexOf(field), ref);\r\n else gen\r\n (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\r\n\r\n gen\r\n (\"break;\");\r\n\r\n } gen\r\n (\"}\");\r\n }\r\n\r\n return gen\r\n (\"return w\");\r\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\r\n}","\"use strict\";\r\nmodule.exports = Enum;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new enum instance.\r\n * @classdesc Reflected enum.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {Object.} [values] Enum values as an object, by name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nutil.props(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n\r\n /**\r\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById|valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\r\n */\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (this.values[name] !== undefined)\r\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\r\n /* istanbul ignore next */\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(16),\r\n types = require(33),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string|Object.} [rule=\"optional\"] Field rule\r\n * @param {string|Object.} [extend] Extended type if different from parent\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id\", \"a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Whether this field's value is a buffer.\r\n * @type {boolean}\r\n */\r\n this.bytes = type === \"bytes\";\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nutil.props(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n // defaults to packed=true if not explicity set to false\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether this field is packed. This is an alias of {@link Field#packed|packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\r\n */\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined) {\r\n if (!MapField)\r\n MapField = require(18);\r\n return MapField.fromJSON(name, json);\r\n }\r\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n if (!Type)\r\n Type = require(32);\r\n if (this.resolvedType = this.parent.lookup(this.type, Type))\r\n typeDefault = null;\r\n else if (this.resolvedType = this.parent.lookup(this.type, Enum))\r\n typeDefault = 0;\r\n /* istanbul ignore next */\r\n else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved, determine the default value\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else {\r\n if (this.options && this.options[\"default\"] !== undefined)\r\n this.defaultValue = this.options[\"default\"];\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long) {\r\n this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === \"u\");\r\n if (Object.freeze)\r\n Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\r\n }\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(17);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nMapField.className = \"MapField\";\r\n\r\nvar types = require(33),\r\n util = require(34);\r\n\r\n/**\r\n * Constructs a new map field instance.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n\r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\r\n if (types.mapKey[this.keyType] === undefined)\r\n throw Error(\"invalid key type: \" + this.keyType);\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Message;\r\n\r\nvar convert = require(13);\r\n\r\n/**\r\n * Constructs a new message instance.\r\n *\r\n * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`.\r\n * @classdesc Abstract runtime message.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @see {@link Class.create}\r\n */\r\nfunction Message(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/** @alias Message.prototype */\r\nvar MessagePrototype = Message.prototype;\r\n\r\n/**\r\n * Reference to the reflected type.\r\n * @name Message#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n\r\n/**\r\n * Converts this message to a JSON object.\r\n * @param {JSONConversionOptions} [options] Conversion options\r\n * @returns {Object.} JSON object\r\n */\r\nMessagePrototype.asJSON = function asJSON(options) {\r\n return convert(this.$type, this, {}, options, convert.toJson);\r\n};\r\n\r\n/**\r\n * Creates a message from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Options\r\n * @returns {Message} Message instance\r\n */\r\nMessage.from = function from(object, options) {\r\n return convert(this.$type, object, new this.constructor(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encode = function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its length as a varint.\r\n * @param {Message|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @name Message.decode\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decode = function decode(readerOrBuffer) {\r\n return this.$type.decode(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its length as a varint.\r\n * @name Message.decodeDelimited\r\n * @function\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode\r\n * @returns {Message} Decoded message\r\n */\r\nMessage.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n return this.$type.decodeDelimited(readerOrBuffer);\r\n};\r\n\r\n/**\r\n * Verifies a message of this type.\r\n * @name Message.verify\r\n * @function\r\n * @param {Message|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nMessage.verify = function verify(message) {\r\n return this.$type.verify(message);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(32),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method instance.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n /* istanbul ignore next */\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n /* istanbul ignore next */\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (type && !util.isString(type))\r\n throw TypeError(\"type\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object.} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream || undefined,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream || undefined,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n /* istanbul ignore next */\r\n if (!(this.resolvedRequestType = this.parent.lookup(this.requestType, Type)))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n /* istanbul ignore next */\r\n if (!(this.resolvedResponseType = this.parent.lookup(this.responseType, Type)))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(16),\r\n Field = require(17),\r\n util = require(34);\r\n\r\nvar Type, // cyclic\r\n Service; // cyclic\r\n\r\nvar nestedTypes, // contains cyclics\r\n nestedError;\r\n\r\nfunction initNested() {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n nestedTypes = [ Enum, Type, Service, Field, Namespace ];\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(\", \");\r\n}\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new namespace instance.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n\r\n /**\r\n * Properties to remove when cache is cleared.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._clearProperties = [];\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n for (var i = 0; i < namespace._clearProperties.length; ++i)\r\n delete namespace[namespace._clearProperties[i]];\r\n namespace._clearProperties = [];\r\n return namespace;\r\n}\r\n\r\nutil.props(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object.} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson) {\r\n if (!nestedTypes)\r\n initNested();\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Gets the values of the nested {@link Enum|enum} of the specified name.\r\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\r\n * @param {string} name Nested enum name\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If there is no such enum\r\n */\r\nNamespacePrototype.getEnum = function getEnum(name) {\r\n if (this.nested && this.nested[name] instanceof Enum)\r\n return this.nested[name].values;\r\n throw Error(\"no such enum\");\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!nestedTypes)\r\n initNested();\r\n\r\n /* istanbul ignore next */\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw TypeError(\"object\", nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object\", \"an extension field when not part of a type\");\r\n\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n // initNested above already initializes Type and Service\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n\r\n /* istanbul ignore next */\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n\r\n /* istanbul ignore next */\r\n if (!(object instanceof ReflectionObject))\r\n throw TypeError(\"object\", \"a ReflectionObject\");\r\n /* istanbul ignore next */\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split(\".\");\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.resolve = function resolve() {\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(30);\r\n\r\n // Add uppercased (and thus conflict-free) nested types, services and enums as properties\r\n // of the type just like static code does. This allows using a .d.ts generated for a static\r\n // module with reflection-based solutions where the condition is met.\r\n var nested = this.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n if (/^[A-Z]/.test(nested[i].name)) {\r\n if (nested[i] instanceof Type || nested[i] instanceof Service)\r\n this[nested[i].name] = nested[i];\r\n else if (nested[i] instanceof Enum)\r\n this[nested[i].name] = nested[i].values;\r\n else\r\n continue;\r\n this._clearProperties.push(nested[i].name);\r\n }\r\n\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolveAll() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\r\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\r\n if (typeof filterType === \"boolean\") {\r\n parentAlreadyChecked = filterType;\r\n filterType = undefined;\r\n }\r\n if (util.isString(path) && path.length)\r\n path = path.split(\".\");\r\n else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1), filterType);\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path, filterType);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @name Namespace#lookup\r\n * @function\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n * @variation 2\r\n */\r\n// lookup(path: string, [parentAlreadyChecked: boolean])\r\n\r\n/**\r\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Type} Looked up type\r\n * @throws {Error} If `path` does not point to a type\r\n */\r\nNamespacePrototype.lookupType = function lookupType(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Type)\r\n Type = require(32);\r\n\r\n var found = this.lookup(path, Type);\r\n if (!found)\r\n throw Error(\"no such type\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Service} Looked up service\r\n * @throws {Error} If `path` does not point to a service\r\n */\r\nNamespacePrototype.lookupService = function lookupService(path) {\r\n\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(30);\r\n\r\n var found = this.lookup(path, Service);\r\n if (!found)\r\n throw Error(\"no such service\");\r\n return found;\r\n};\r\n\r\n/**\r\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\r\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\r\n * @param {string|string[]} path Path to look up\r\n * @returns {Object.} Enum values\r\n * @throws {Error} If `path` does not point to an enum\r\n */\r\nNamespacePrototype.lookupEnum = function lookupEnum(path) {\r\n var found = this.lookup(path, Enum);\r\n if (!found)\r\n throw Error(\"no such enum\");\r\n return found.values;\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nvar util = require(34);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object instance.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object.} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n\r\n /* istanbul ignore next */\r\n if (!util.isString(name))\r\n throw TypeError(\"name\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nutil.props(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join(\".\");\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object.} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (!Root)\r\n Root = require(27);\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Class name[, space, full name]\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n var className = this.constructor.className;\r\n var fullName = this.getFullName();\r\n if (fullName.length)\r\n return className + \" \" + fullName;\r\n return className;\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(22);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof instance.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]|Object} [fieldNames] Field names\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n\r\n /* istanbul ignore next */\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = util.ucFirst(this.name);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {string[]}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = [];\r\n}\r\n\r\n/**\r\n * Fields that belong to this oneof as an array for iteration.\r\n * @name OneOf#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\nutil.prop(OneOfPrototype, \"fieldsArray\", {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray;\r\n }\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object.} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent) {\r\n oneof._fieldsArray.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fieldsArray.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n\r\n /* istanbul ignore next */\r\n if (!(field instanceof Field))\r\n throw TypeError(\"field\", \"a Field\");\r\n\r\n var index = this._fieldsArray.indexOf(field);\r\n /* istanbul ignore next */\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n\r\n this._fieldsArray.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n var self = this;\r\n // Collect present fields\r\n this.oneof.forEach(function(fieldName) {\r\n var field = parent.get(fieldName);\r\n if (field && !field.partOf) {\r\n field.partOf = self;\r\n self._fieldsArray.push(field);\r\n }\r\n });\r\n // Add not yet present fields\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fieldsArray.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(31),\r\n Root = require(27),\r\n Type = require(32),\r\n Field = require(17),\r\n MapField = require(18),\r\n OneOf = require(23),\r\n Enum = require(16),\r\n Service = require(30),\r\n Method = require(20),\r\n types = require(33),\r\n util = require(34);\r\n\r\nfunction isName(token) {\r\n return /^[a-zA-Z_][a-zA-Z_0-9]*$/.test(token);\r\n}\r\n\r\nfunction isTypeRef(token) {\r\n return /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction isFqTypeRef(token) {\r\n return /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(token);\r\n}\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object.}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Options modifying the behavior of {@link parse}.\r\n * @typedef ParseOptions\r\n * @type {Object.}\r\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {Root} root Root to populate\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @property {string} filename=null Currently processing file name for error reporting, if known\r\n */\r\nfunction parse(source, root, options) {\r\n /* eslint-disable callback-return */\r\n if (!(root instanceof Root)) {\r\n root = new Root();\r\n options = root || {};\r\n } else if (!options)\r\n options = {};\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n var applyCase = options.keepCase ? function(name) { return name; } : camelCase;\r\n\r\n function illegal(token, name) {\r\n var filename = parse.filename;\r\n parse.filename = null;\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line() + \")\");\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === \"\\\"\" || token === \"'\");\r\n return values.join(\"\");\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case \"'\":\r\n case \"\\\"\":\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && isTypeRef(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(\";\");\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === \"-\") {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, \"number\");\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"max\": return 536870911;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === \"-\" && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!isTypeRef(pkg))\r\n throw illegal(pkg, \"name\");\r\n ptr = ptr.define(pkg);\r\n skip(\";\");\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(\";\");\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n isProto3 = syntax === \"proto3\";\r\n if (!isProto3 && syntax !== \"proto2\")\r\n throw illegal(syntax, \"syntax\");\r\n skip(\";\");\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case \"option\":\r\n parseOption(parent, token);\r\n skip(\";\");\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, tokenLower);\r\n break;\r\n\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n\r\n default:\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, \"optional\");\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (lower(type) === \"group\") {\r\n parseGroup(parent, rule);\r\n return;\r\n }\r\n if (!isTypeRef(type))\r\n throw illegal(type, \"type\");\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\r\n // parsing proto2 descriptors without the option, where applicable.\r\n if (field.repeated && types.packed[type] !== undefined && !isProto3)\r\n field.setOption(\"packed\", false, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseGroup(parent, rule) {\r\n var name = next();\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var fieldName = util.lcFirst(name);\r\n if (name === fieldName)\r\n name = util.ucFirst(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var type = new Type(name);\r\n type.group = true;\r\n var field = new Field(fieldName, id, name, rule);\r\n skip(\"{\");\r\n while ((token = next()) !== \"}\") {\r\n switch (token = lower(token)) {\r\n case \"option\":\r\n parseOption(type, token);\r\n skip(\";\");\r\n break;\r\n case \"required\":\r\n case \"optional\":\r\n case \"repeated\":\r\n parseField(type, token);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token); // there are no groups with proto3 semantics\r\n }\r\n }\r\n skip(\";\", true);\r\n parent.add(type).add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n\r\n /* istanbul ignore next */\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, \"type\");\r\n skip(\",\");\r\n var valueType = next();\r\n /* istanbul ignore next */\r\n if (!isTypeRef(valueType))\r\n throw illegal(valueType, \"type\");\r\n skip(\">\");\r\n var name = next();\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n name = applyCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (token === \"option\") {\r\n parseOption(oneof, token);\r\n skip(\";\");\r\n } else {\r\n push(token);\r\n parseField(oneof, \"optional\");\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n if (lower(token) === \"option\") {\r\n parseOption(enm, token);\r\n skip(\";\");\r\n } else\r\n parseEnumField(enm, token);\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(\"(\", true);\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(name))\r\n throw illegal(name, \"name\");\r\n\r\n if (custom) {\r\n skip(\")\");\r\n name = \"(\" + name + \")\";\r\n token = peek();\r\n if (isFqTypeRef(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"name\");\r\n\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, \"option\");\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(\";\");\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(token))\r\n throw illegal(token, \"service name\");\r\n\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(service, tokenLower);\r\n skip(\";\");\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isName(name))\r\n throw illegal(name, \"name\");\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(\"(\");\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(\")\"); skip(\"returns\"); skip(\"(\");\r\n if (skip(st, true))\r\n responseStream = true;\r\n /* istanbul ignore next */\r\n if (!isTypeRef(token = next()))\r\n throw illegal(token);\r\n\r\n responseType = token;\r\n skip(\")\");\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"option\":\r\n parseOption(method, tokenLower);\r\n skip(\";\");\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n\r\n /* istanbul ignore next */\r\n if (!isTypeRef(reference))\r\n throw illegal(reference, \"reference\");\r\n\r\n if (skip(\"{\", true)) {\r\n while ((token = next()) !== \"}\") {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"required\":\r\n case \"repeated\":\r\n case \"optional\":\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n /* istanbul ignore next */\r\n if (!isProto3 || !isTypeRef(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, \"optional\", reference);\r\n break;\r\n }\r\n }\r\n skip(\";\", true);\r\n } else\r\n skip(\";\");\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case \"option\":\r\n /* istanbul ignore next */\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(\";\");\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n /* istanbul ignore next */\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n parse.filename = null;\r\n return {\r\n \"package\" : pkg,\r\n \"imports\" : imports,\r\n weakImports : weakImports,\r\n syntax : syntax,\r\n root : root\r\n };\r\n}\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @name parse\r\n * @function\r\n * @param {string} source Source contents\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {ParserResult} Parser result\r\n * @variation 2\r\n */\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(36);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(26);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(25);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(17),\r\n util = require(34);\r\n\r\nvar parse, // cyclic, might be excluded\r\n common; // might be excluded\r\n\r\n/**\r\n * Constructs a new root namespace instance.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object.} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files.\r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {Object.|*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n // note that `json` actually must be of type `Object.` but TypeScript\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.path.resolve;\r\n\r\n// A symbol-like function to safely signal synchronous loading\r\n/* istanbul ignore next */\r\nfunction SYNC() {} // eslint-disable-line no-empty-function\r\n\r\nvar initParser = function() {\r\n try { // excluded in noparse builds\r\n parse = require(24);\r\n common = require(12);\r\n } catch (e) {} // eslint-disable-line no-empty\r\n initParser = null;\r\n};\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} options Parse options\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nRootPrototype.load = function load(filename, options, callback) {\r\n if (initParser)\r\n initParser();\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = undefined;\r\n }\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n var sync = callback === SYNC; // undocumented\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n parse.filename = filename;\r\n var parsed = parse(source, self, options);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!sync && !queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (sync)\r\n return self;\r\n if (!queued)\r\n finish(null, self);\r\n return undefined;\r\n};\r\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [options:ParseOptions]):Promise\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {ParseOptions} [options] Parse options\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nRootPrototype.loadSync = function loadSync(filename, options) {\r\n return this.load(filename, options, SYNC);\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Streaming RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(29);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(34);\r\nvar EventEmitter = util.EventEmitter;\r\n\r\n/**\r\n * Constructs a new RPC service instance.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nService.className = \"Service\";\r\n\r\nvar Method = require(20),\r\n util = require(34),\r\n rpc = require(28);\r\n\r\n/**\r\n * Constructs a new service instance.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nutil.props(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object.} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolveAll() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n /* istanbul ignore next */\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n\r\n /* istanbul ignore next */\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @type {function}\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Uint8Array} [responseData] Response data or `null` to signal end of stream, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpcImpl {@link RPCImpl|RPC implementation}\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\r\n this.getMethodsArray().forEach(function(method) {\r\n rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {\r\n if (!rpcService.$rpc) // already ended?\r\n return;\r\n\r\n /* istanbul ignore next */\r\n if (!request)\r\n throw util._TypeError(\"request\", \"not null\");\r\n\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === \"function\" ? setImmediate : setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit(\"error\", err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited ? method.resolvedResponseType.decodeDelimited(responseData) : method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n rpcService.emit(\"error\", err2, method);\r\n return callback ? callback(\"error\", err2) : undefined;\r\n }\r\n rpcService.emit(\"data\", response, method);\r\n return callback ? callback(null, response) : undefined;\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object.} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n/**/\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable callback-return */\r\n source = source.toString();\r\n\r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n\r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /* istanbul ignore next */\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === \"/\") {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === \"/\") { // Line\r\n while (charAt(++offset) !== \"\\n\")\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\r\n do {\r\n if (curr === \"\\n\")\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== \"*\" || curr !== \"/\");\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return \"/\";\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === \"\\\"\" || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type;\r\n\r\nvar Namespace = require(21);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nType.className = \"Type\";\r\n\r\nvar Enum = require(16),\r\n OneOf = require(23),\r\n Field = require(17),\r\n Service = require(30),\r\n Class = require(11),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(38),\r\n convert = require(13),\r\n util = require(34);\r\n\r\nvar encoder, // might become cyclic\r\n decoder, // might become cyclic\r\n verifier; // cyclic\r\n\r\n/**\r\n * Constructs a new reflected message type instance.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object.} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /*?\r\n * Whether this type is a legacy group.\r\n * @type {boolean|undefined}\r\n */\r\n this.group = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n\r\n /* istanbul ignore next */\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Class}\r\n */\r\n ctor: {\r\n get: function getCtor() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw util._TypeError(\"ctor\", \"a Message constructor\");\r\n if (!ctor.from)\r\n ctor.from = Message.from;\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n delete type.verify;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object.} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n if (json.group)\r\n type.group = true;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n group : this.group || undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolveAll() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object.} [properties] Properties to set\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.create = function create(properties) {\r\n return new (this.getCtor())(properties);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types.\r\n * @param {Object.} object JSON object\r\n * @param {MessageConversionOptions} [options] Conversion options\r\n * @returns {Message} Runtime message\r\n */\r\nTypePrototype.from = function from(object, options) {\r\n return convert(this, object, new (this.getCtor())(), options, convert.toMessage);\r\n};\r\n\r\n/**\r\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\r\n * @returns {Type} `this`\r\n */\r\nTypePrototype.setup = function setup() {\r\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\r\n // multiple times (V8, soft-deopt prototype-check).\r\n if (!encoder) {\r\n encoder = require(15);\r\n decoder = require(14);\r\n verifier = require(37);\r\n }\r\n this.encode = encoder(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode_setup(message, writer) {\r\n return this.setup().encode(message, writer); // overrides this method\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Message|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decode = function decode_setup(readerOrBuffer, length) {\r\n return this.setup().decode(readerOrBuffer, length); // overrides this method\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Message} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that field values are valid and that required fields are present.\r\n * @param {Message|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify_setup(message) {\r\n return this.setup().verify(message); // overrides this method\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar util = require(34);\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\", // 14\r\n \"message\" // 15\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n * @property {number} bytes=2 Ldelim wire type\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n * @property {number} double=0 Double default\r\n * @property {number} float=0 Float default\r\n * @property {number} int32=0 Int32 default\r\n * @property {number} uint32=0 Uint32 default\r\n * @property {number} sint32=0 Sint32 default\r\n * @property {number} fixed32=0 Fixed32 default\r\n * @property {number} sfixed32=0 Sfixed32 default\r\n * @property {number} int64=0 Int64 default\r\n * @property {number} uint64=0 Uint64 default\r\n * @property {number} sint64=0 Sint32 default\r\n * @property {number} fixed64=0 Fixed64 default\r\n * @property {number} sfixed64=0 Sfixed64 default\r\n * @property {boolean} bool=false Bool default\r\n * @property {string} string=\"\" String default\r\n * @property {Array.} bytes=Array(0) Bytes default\r\n * @property {Message} message=null Message default\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ util.emptyArray,\r\n /* message */ null\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n * @property {number} string=2 Ldelim wire type\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n * @property {number} double=1 Fixed64 wire type\r\n * @property {number} float=5 Fixed32 wire type\r\n * @property {number} int32=0 Varint wire type\r\n * @property {number} uint32=0 Varint wire type\r\n * @property {number} sint32=0 Varint wire type\r\n * @property {number} fixed32=5 Fixed32 wire type\r\n * @property {number} sfixed32=5 Fixed32 wire type\r\n * @property {number} int64=0 Varint wire type\r\n * @property {number} uint64=0 Varint wire type\r\n * @property {number} sint64=0 Varint wire type\r\n * @property {number} fixed64=1 Fixed64 wire type\r\n * @property {number} sfixed64=1 Fixed64 wire type\r\n * @property {number} bool=0 Varint wire type\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Various utility functions.\r\n * @namespace\r\n */\r\nvar util = module.exports = require(36);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(3);\r\nutil.EventEmitter = require(4);\r\nutil.extend = require(5);\r\nutil.fetch = require(6);\r\nutil.path = require(8);\r\n\r\n/**\r\n * Node's fs module if available.\r\n * @type {Object.}\r\n */\r\nutil.fs = util.inquire(\"fs\");\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=\"a string\"] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object.} dst Destination object\r\n * @param {Object.} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object.} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n return \"[\\\"\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"]\";\r\n};\r\n\r\n/**\r\n * Converts the second character of a string to lower case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util\r\n return str.charAt(0).toLowerCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n size = size || 0;\r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe(size)\r\n : new (typeof Uint8Array !== \"undefined\" ? Uint8Array : Array)(size);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(36);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(16),\r\n Type = require(32),\r\n util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return \"invalid value for field \" + field.getFullName() + \" (\" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected)\";\r\n}\r\n\r\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n if (field.resolvedType) {\r\n if (field.resolvedType instanceof Enum) { gen\r\n (\"switch(%s){\", ref)\r\n (\"default:\")\r\n (\"return%j\", invalid(field, \"enum value\"));\r\n var values = util.toArray(field.resolvedType.values);\r\n for (var j = 0; j < values.length; ++j) gen\r\n (\"case %d:\", values[j]);\r\n gen\r\n (\"break\")\r\n (\"}\");\r\n } else if (field.resolvedType instanceof Type) gen\r\n (\"var r;\")\r\n (\"if(r=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return r\");\r\n } else {\r\n switch (field.type) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!util.isInteger(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\r\n (\"return%j\", invalid(field, \"integer|Long\"));\r\n break;\r\n case \"float\":\r\n case \"double\": gen\r\n (\"if(typeof %s!==\\\"number\\\")\", ref)\r\n (\"return%j\", invalid(field, \"number\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\r\n (\"return%j\", invalid(field, \"boolean\"));\r\n break;\r\n case \"string\": gen\r\n (\"if(!util.isString(%s))\", ref)\r\n (\"return%j\", invalid(field, \"string\"));\r\n break;\r\n case \"bytes\": gen\r\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\r\n (\"return%j\", invalid(field, \"buffer\"));\r\n break;\r\n }\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\nfunction genVerifyKey(gen, field, ref) {\r\n /* eslint-disable no-unexpected-multiline */\r\n switch (field.keyType) {\r\n case \"int32\":\r\n case \"uint32\":\r\n case \"sint32\":\r\n case \"fixed32\":\r\n case \"sfixed32\": gen\r\n (\"if(!/^-?(?:0|[1-9]\\\\d*)$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer key\"));\r\n break;\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\": gen\r\n (\"if(!/^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9]\\\\d*))$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"integer|Long key\"));\r\n break;\r\n case \"bool\": gen\r\n (\"if(!/^true|false|0|1$/.test(%s))\", ref)\r\n (\"return%j\", invalid(field, \"boolean key\"));\r\n break;\r\n }\r\n /* eslint-enable no-unexpected-multiline */\r\n}\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {Codegen} Codegen instance\r\n */\r\nfunction verifier(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n ref = \"m\" + util.safeProp(field.name);\r\n\r\n // map fields\r\n if (field.map) { gen\r\n (\"if(%s!==undefined){\", ref)\r\n (\"if(!util.isObject(%s))\", ref)\r\n (\"return%j\", invalid(field, \"object\"))\r\n (\"var k=Object.keys(%s)\", ref)\r\n (\"for(var i=0;i 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(38);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(36);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * A node-style callback as used by {@link load} and {@link Root#load}.\r\n * @typedef LoadCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {Root} [root] Root, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === \"function\") {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback);\r\n}\r\n// function load(filename:string, root:Root, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {LoadCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:LoadCallback):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\r\n\r\nprotobuf.load = load;\r\n\r\n/**\r\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @returns {Root} Root namespace\r\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\r\n */\r\nfunction loadSync(filename, root) {\r\n if (!root)\r\n root = new protobuf.Root();\r\n return root.loadSync(filename);\r\n}\r\n\r\nprotobuf.loadSync = loadSync;\r\n\r\n/**\r\n * Named roots.\r\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\r\n * Can also be used manually to make roots available accross modules.\r\n * @name roots\r\n * @type {Object.}\r\n */\r\nprotobuf.roots = {};\r\n\r\n// Parser (if not excluded)\r\ntry {\r\n protobuf.tokenize = require(\"./tokenize\");\r\n protobuf.parse = require(\"./parse\");\r\n protobuf.common = require(\"./common\");\r\n} catch (e) {} // eslint-disable-line no-empty\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = require(\"./writer_buffer\");\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = require(\"./reader_buffer\");\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Class = require(\"./class\");\r\nprotobuf.Message = require(\"./message\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\nprotobuf.configure = configure;\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * Reconfigures the library according to the environment.\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n/* istanbul ignore next */\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/runtime/protobuf.js b/dist/runtime/protobuf.js index f1f276eb2..02aa7c6a4 100644 --- a/dist/runtime/protobuf.js +++ b/dist/runtime/protobuf.js @@ -1,6 +1,6 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -935,6 +935,13 @@ zero.toNumber = function() { return 0; }; zero.zzEncode = zero.zzDecode = function() { return this; }; zero.length = function() { return 1; }; +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + /** * Constructs new long bits from the specified number. * @param {number} value Value @@ -943,10 +950,11 @@ zero.length = function() { return 1; }; LongBits.fromNumber = function fromNumber(value) { if (value === 0) return zero; - var sign = value < 0; - value = Math.abs(value); + var sign = value < 0; + if (sign) + value = -value; var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; + hi = (value - lo) / 4294967296 >>> 0; if (sign) { hi = ~hi >>> 0; lo = ~lo >>> 0; @@ -968,6 +976,7 @@ LongBits.from = function from(value) { if (typeof value === "number") return LongBits.fromNumber(value); if (typeof value === "string") { + /* istanbul ignore else */ if (util.Long) value = util.Long.fromString(value); else @@ -983,11 +992,11 @@ LongBits.from = function from(value) { */ LongBitsPrototype.toNumber = function toNumber(unsigned) { if (!unsigned && this.hi >>> 31) { - this.lo = ~this.lo + 1 >>> 0; - this.hi = ~this.hi >>> 0; - if (!this.lo) - this.hi = this.hi + 1 >>> 0; - return -(this.lo + this.hi * 4294967296); + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); } return this.lo + this.hi * 4294967296; }; @@ -1000,6 +1009,7 @@ LongBitsPrototype.toNumber = function toNumber(unsigned) { LongBitsPrototype.toLong = function toLong(unsigned) { return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; }; @@ -1011,6 +1021,8 @@ var charCodeAt = String.prototype.charCodeAt; * @returns {util.LongBits} Bits */ LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; return new LongBits( ( charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 @@ -1184,7 +1196,7 @@ util.isObject = function isObject(value) { util.longToHash = function longToHash(value) { return value ? util.LongBits.from(value).toHash() - : "\0\0\0\0\0\0\0\0"; + : util.LongBits.zeroHash; }; /** @@ -1243,7 +1255,7 @@ util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util /** * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object - * @param {Object} descriptors Property descriptors + * @param {Object.} descriptors Property descriptors * @returns {undefined} */ util.props = function props(target, descriptors) { @@ -1256,7 +1268,7 @@ util.props = function props(target, descriptors) { * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object * @param {string} key Property name - * @param {Object} descriptor Property descriptor + * @param {Object.} descriptor Property descriptor * @returns {undefined} */ util.prop = function prop(target, key, descriptor) { diff --git a/dist/runtime/protobuf.js.map b/dist/runtime/protobuf.js.map index 3a0c3e638..99945f760 100644 --- a/dist/runtime/protobuf.js.map +++ b/dist/runtime/protobuf.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/reader.js","src/reader_buffer.js","src/util/longbits.js","src/util/runtime.js","src/writer.js","src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"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\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\";\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 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(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 i ? 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(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","// This file exports just the bare minimum required to work with statically generated code.\r\n// Can be used as a drop-in replacement for the full library as it has the same general structure.\r\n\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\nprotobuf.Writer = require(\"../src/writer\");\r\nprotobuf.BufferWriter = require(\"../src/writer_buffer\");\r\nprotobuf.Reader = require(\"../src/reader\");\r\nprotobuf.BufferReader = require(\"../src/reader_buffer\");\r\nprotobuf.util = require(\"../src/util/runtime\");\r\nprotobuf.roots = {};\r\nprotobuf.configure = configure;\r\n\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(7);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(6);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n if (!BufferWriter)\r\n BufferWriter = require(11);\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(10);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(9);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/reader.js","src/reader_buffer.js","src/util/longbits.js","src/util/runtime.js","src/writer.js","src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"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\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\";\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 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(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 i ? 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(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","// This file exports just the bare minimum required to work with statically generated code.\r\n// Can be used as a drop-in replacement for the full library as it has the same general structure.\r\n\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\nprotobuf.Writer = require(\"../src/writer\");\r\nprotobuf.BufferWriter = require(\"../src/writer_buffer\");\r\nprotobuf.Reader = require(\"../src/reader\");\r\nprotobuf.BufferReader = require(\"../src/reader_buffer\");\r\nprotobuf.util = require(\"../src/util/runtime\");\r\nprotobuf.roots = {};\r\nprotobuf.configure = configure;\r\n\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(7);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(6);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n if (!BufferWriter)\r\n BufferWriter = require(11);\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(10);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(9);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/runtime/protobuf.min.js b/dist/runtime/protobuf.min.js index 96dd0e907..8b51e5ece 100644 --- a/dist/runtime/protobuf.min.js +++ b/dist/runtime/protobuf.min.js @@ -1,8 +1,8 @@ /*! - * protobuf.js v6.3.1 (c) 2016, Daniel Wirtz - * Compiled Tue, 27 Dec 2016 16:55:50 UTC + * protobuf.js v6.3.2 (c) 2016, Daniel Wirtz + * Compiled Thu, 29 Dec 2016 16:24:03 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ -!function t(i,n,r){function e(s,u){if(!n[s]){if(!i[s]){var h="function"==typeof require&&require;if(!u&&h)return h(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[s]={exports:{}};i[s][0].call(l.exports,function(t){var n=i[s][1][t];return e(n?n:t)},l,l.exports,t,i,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s1&&"="===t.charAt(i);)++n;return Math.ceil(3*t.length)/4-n};for(var e=new Array(64),o=new Array(123),s=0;s<64;)o[e[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;r.encode=function(t,i,n){for(var r,o=[],s=0,u=0;i>2],r=(3&h)<<4,u=1;break;case 1:o[s++]=e[r|h>>4],r=(15&h)<<2,u=2;break;case 2:o[s++]=e[r|h>>6],o[s++]=e[63&h],u=0}}return u&&(o[s++]=e[r],o[s]=61,1===u&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";r.decode=function(t,i,n){for(var r,e=n,s=0,h=0;h1)break;if(void 0===(f=o[f]))throw Error(u);switch(s){case 0:r=f,s=1;break;case 1:i[n++]=r<<2|(48&f)>>4,r=f,s=2;break;case 2:i[n++]=(15&r)<<4|(60&f)>>2,r=f,s=3;break;case 3:i[n++]=(3&r)<<6|f,s=0}}if(1===s)throw Error(u);return n-e}},{}],2:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},{}],3:[function(t,i,n){"use strict";function r(t,i,n){var r=n||8192,e=r>>>1,o=null,s=r;return function(n){if(n<1||n>e)return t(n);s+n>r&&(o=t(r),s=0);var u=i.call(o,s,s+=n);return 7&s&&(s=(7|s)+1),u}}i.exports=r},{}],4:[function(t,i,n){"use strict";var r=n;r.length=function(t){for(var i=0,n=0,r=0;r191&&e<224?s[u++]=(31&e)<<6|63&t[i++]:e>239&&e<365?(e=((7&e)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[i++])<<6|63&t[i++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},r.write=function(t,i,n){for(var r,e,o=n,s=0;s>6|192,i[n++]=63&r|128):55296===(64512&r)&&56320===(64512&(e=t.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&e),++s,i[n++]=r>>18|240,i[n++]=r>>12&63|128,i[n++]=r>>6&63|128,i[n++]=63&r|128):(i[n++]=r>>12|224,i[n++]=r>>6&63|128,i[n++]=63&r|128);return n-o}},{}],5:[function(t,i,n){(function(i){"use strict";function r(){e.Reader.a()}var e=i.protobuf=n;e.Writer=t(10),e.BufferWriter=t(11),e.Reader=t(6),e.BufferReader=t(7),e.util=t(9),e.roots={},e.configure=r,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(e.util.Long=t,r()),e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,6:6,7:7,9:9}],6:[function(t,i,n){"use strict";function r(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),i=0;if(this.len-this.pos>4){for(i=0;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(i=0;i<4;++i){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(i=0;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(i=0;i<5;++i){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function s(){return o.call(this).toLong()}function u(){return o.call(this).toNumber()}function h(){return o.call(this).toLong(!0)}function f(){return o.call(this).toNumber(!0)}function l(){return o.call(this).zzDecode().toLong()}function a(){return o.call(this).zzDecode().toNumber()}function c(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw r(this,8);return new A(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function d(){return p.call(this).toLong(!0)}function b(){return p.call(this).toNumber(!0)}function g(){return p.call(this).zzDecode().toLong()}function v(){return p.call(this).zzDecode().toNumber()}function y(){m.Long?(N.int64=s,N.uint64=h,N.sint64=l,N.fixed64=d,N.sfixed64=g):(N.int64=u,N.uint64=f,N.sint64=a,N.fixed64=b,N.sfixed64=v)}i.exports=e;var w,m=t(9),A=m.LongBits,x=m.utf8;e.create=m.Buffer?function(i){return w||(w=t(7)),(e.create=function(t){return new w(t)})(i)}:function(t){return new e(t)};var N=e.prototype;N.b=m.Array.prototype.subarray||m.Array.prototype.slice,N.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),N.int32=function(){return 0|this.uint32()},N.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},N.bool=function(){return 0!==this.uint32()},N.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return c(this.buf,this.pos+=4)},N.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var L="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[3]?function(n,r){return i[0]=n[r],i[1]=n[r+1],i[2]=n[r+2],i[3]=n[r+3],t[0]}:function(n,r){return i[3]=n[r],i[2]=n[r+1],i[1]=n[r+2],i[0]=n[r+3],t[0]}}():function(t,i){var n=c(t,i+4),r=2*(n>>31)+1,e=n>>>23&255,o=8388607&n;return 255===e?o?NaN:r*(1/0):0===e?1.401298464324817e-45*r*o:r*Math.pow(2,e-150)*(o+8388608)};N.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=L(this.buf,this.pos);return this.pos+=4,t};var z="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[7]?function(n,r){return i[0]=n[r],i[1]=n[r+1],i[2]=n[r+2],i[3]=n[r+3],i[4]=n[r+4],i[5]=n[r+5],i[6]=n[r+6],i[7]=n[r+7],t[0]}:function(n,r){return i[7]=n[r],i[6]=n[r+1],i[5]=n[r+2],i[4]=n[r+3],i[3]=n[r+4],i[2]=n[r+5],i[1]=n[r+6],i[0]=n[r+7],t[0]}}():function(t,i){var n=c(t,i+4),r=c(t,i+8),e=2*(r>>31)+1,o=r>>>20&2047,s=4294967296*(1048575&r)+n;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};N.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=z(this.buf,this.pos);return this.pos+=8,t},N.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,i===n?new this.buf.constructor(0):this.b.call(this.buf,i,n)},N.string=function(){var t=this.bytes();return x.read(t,0,t.length)},N.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},N.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},e.a=y,y()},{7:7,9:9}],7:[function(t,i,n){"use strict";function r(t){e.call(this,t)}i.exports=r;var e=t(6),o=r.prototype=Object.create(e.prototype);o.constructor=r;var s=t(9);s.Buffer&&(o.b=s.Buffer.prototype.slice),o.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{6:6,9:9}],8:[function(t,i,n){"use strict";function r(t,i){this.lo=t,this.hi=i}i.exports=r;var e=t(9),o=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},r.fromNumber=function(t){if(0===t)return s;var i=t<0;t=Math.abs(t);var n=t>>>0,e=(t-n)/4294967296>>>0;return i&&(e=~e>>>0,n=~n>>>0,++n>4294967295&&(n=0,++e>4294967295&&(e=0))),new r(n,e)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if("string"==typeof t){if(!e.Long)return r.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):s},o.toNumber=function(t){return!t&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},o.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var u=String.prototype.charCodeAt;r.fromHash=function(t){return new r((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},o.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},o.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},o.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{9:9}],9:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(8),util.base64=require(1),util.inquire=require(2),util.utf8=require(4),util.pool=require(3),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(i,n){return new t(i,n)}),t.allocUnsafe||(t.allocUnsafe=function(i){return new t(i)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():"\0\0\0\0\0\0\0\0"},util.longFromHash=function(t,i){var n=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(n.lo,n.hi,i):n.toNumber(Boolean(i))},util.longNeq=function(t,i){return"number"==typeof t?"number"==typeof i?t!==i:(t=util.LongBits.fromNumber(t)).lo!==i.low||t.hi!==i.high:"number"==typeof i?(i=util.LongBits.fromNumber(i)).lo!==t.low||i.hi!==t.high:t.low!==i.low||t.high!==i.high},util.longNe=function(t,i,n){if("object"==typeof t)return t.low!==i||t.high!==n;var r=util.LongBits.from(t);return r.lo!==i||r.hi!==n},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,i){Object.keys(i).forEach(function(n){util.prop(t,n,i[n])})},util.prop=function(t,i,n){var r=util.ucFirst(i);n.get&&(t["get"+r]=n.get),n.set&&(t["set"+r]=util.isIE8?function(t){n.set.call(this,t),this[i]=t}:n.set),util.isIE8?void 0!==n.value&&(t[i]=n.value):Object.defineProperty(t,i,n)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,4:4,8:8}],10:[function(t,i,n){"use strict";function r(t,i,n){this.fn=t,this.len=i,this.next=void 0,this.val=n}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new r(e,0,0),this.tail=this.head,this.states=null}function u(t,i,n){i[n]=255&t}function h(t,i,n){for(;t>127;)i[n++]=127&t|128,t>>>=7;i[n]=t}function f(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function l(t,i,n){i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n]=t>>>24}i.exports=s;var a,c=t(9),p=c.LongBits,d=c.base64,b=c.utf8;s.create=c.Buffer?function(){return a||(a=t(11)),(s.create=function(){return new a})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray));var g=s.prototype;g.push=function(t,i,n){return this.tail=this.tail.next=new r(t,i,n),this.len+=i,this},g.uint32=function(t){return t>>>=0,this.push(h,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},g.int32=function(t){return t<0?this.push(f,10,p.fromNumber(t)):this.uint32(t)},g.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},g.uint64=function(t){var i=p.from(t);return this.push(f,i.length(),i)},g.int64=g.uint64,g.sint64=function(t){var i=p.from(t).zzEncode();return this.push(f,i.length(),i)},g.bool=function(t){return this.push(u,1,t?1:0)},g.fixed32=function(t){return this.push(l,4,t>>>0)},g.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},g.fixed64=function(t){var i=p.from(t);return this.push(l,4,i.lo).push(l,4,i.hi)},g.sfixed64=function(t){var i=p.from(t).zzEncode();return this.push(l,4,i.lo).push(l,4,i.hi)};var v="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[3]?function(n,r,e){t[0]=n,r[e++]=i[0],r[e++]=i[1],r[e++]=i[2],r[e]=i[3]}:function(n,r,e){t[0]=n,r[e++]=i[3],r[e++]=i[2],r[e++]=i[1],r[e]=i[0]}}():function(t,i,n){var r=t<0?1:0;if(r&&(t=-t),0===t)l(1/t>0?0:2147483648,i,n);else if(isNaN(t))l(2147483647,i,n);else if(t>3.4028234663852886e38)l((r<<31|2139095040)>>>0,i,n);else if(t<1.1754943508222875e-38)l((r<<31|Math.round(t/1.401298464324817e-45))>>>0,i,n);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);l((r<<31|e+127<<23|o)>>>0,i,n)}};g.float=function(t){return this.push(v,4,t)};var y="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[7]?function(n,r,e){t[0]=n,r[e++]=i[0],r[e++]=i[1],r[e++]=i[2],r[e++]=i[3],r[e++]=i[4],r[e++]=i[5],r[e++]=i[6],r[e]=i[7]}:function(n,r,e){t[0]=n,r[e++]=i[7],r[e++]=i[6],r[e++]=i[5],r[e++]=i[4],r[e++]=i[3],r[e++]=i[2],r[e++]=i[1],r[e]=i[0]}}():function(t,i,n){var r=t<0?1:0;if(r&&(t=-t),0===t)l(0,i,n),l(1/t>0?0:2147483648,i,n+4);else if(isNaN(t))l(4294967295,i,n),l(2147483647,i,n+4);else if(t>1.7976931348623157e308)l(0,i,n),l((r<<31|2146435072)>>>0,i,n+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,l(e>>>0,i,n),l((r<<31|e/4294967296)>>>0,i,n+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),l(4503599627370496*e>>>0,i,n),l((r<<31|o+1023<<20|1048576*e&1048575)>>>0,i,n+4)}}};g.double=function(t){return this.push(y,8,t)};var w=c.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;if("string"==typeof t&&i){var n=s.alloc(i=d.length(t));d.decode(t,n,0),t=n}return i?this.uint32(i).push(w,i,t):this.push(u,1,0)},g.string=function(t){var i=b.length(t);return i?this.uint32(i).push(b.write,i,t):this.push(u,1,0)},g.fork=function(){return this.states=new o(this),this.head=this.tail=new r(e,0,0),this.len=0,this},g.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(e,0,0),this.len=0),this},g.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n).tail.next=t.next,this.tail=i,this.len+=n,this},g.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i}},{11:11,9:9}],11:[function(t,i,n){"use strict";function r(){o.call(this)}function e(t,i,n){t.length<40?h.write(t,i,n):i.utf8Write(t,n)}i.exports=r;var o=t(10),s=r.prototype=Object.create(o.prototype);s.constructor=r;var u=t(9),h=u.utf8,f=u.Buffer;r.alloc=function(t){return(r.alloc=f.allocUnsafe)(t)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){t.copy(i,n,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.push(l,i,t),this},s.string=function(t){var i=f.byteLength(t);return this.uint32(i),i&&this.push(e,i,t),this}},{10:10,9:9}]},{},[5]); +!function t(i,n,r){function e(s,u){if(!n[s]){if(!i[s]){var h="function"==typeof require&&require;if(!u&&h)return h(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[s]={exports:{}};i[s][0].call(l.exports,function(t){var n=i[s][1][t];return e(n?n:t)},l,l.exports,t,i,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s1&&"="===t.charAt(i);)++n;return Math.ceil(3*t.length)/4-n};for(var e=new Array(64),o=new Array(123),s=0;s<64;)o[e[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;r.encode=function(t,i,n){for(var r,o=[],s=0,u=0;i>2],r=(3&h)<<4,u=1;break;case 1:o[s++]=e[r|h>>4],r=(15&h)<<2,u=2;break;case 2:o[s++]=e[r|h>>6],o[s++]=e[63&h],u=0}}return u&&(o[s++]=e[r],o[s]=61,1===u&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";r.decode=function(t,i,n){for(var r,e=n,s=0,h=0;h1)break;if(void 0===(f=o[f]))throw Error(u);switch(s){case 0:r=f,s=1;break;case 1:i[n++]=r<<2|(48&f)>>4,r=f,s=2;break;case 2:i[n++]=(15&r)<<4|(60&f)>>2,r=f,s=3;break;case 3:i[n++]=(3&r)<<6|f,s=0}}if(1===s)throw Error(u);return n-e}},{}],2:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},{}],3:[function(t,i,n){"use strict";function r(t,i,n){var r=n||8192,e=r>>>1,o=null,s=r;return function(n){if(n<1||n>e)return t(n);s+n>r&&(o=t(r),s=0);var u=i.call(o,s,s+=n);return 7&s&&(s=(7|s)+1),u}}i.exports=r},{}],4:[function(t,i,n){"use strict";var r=n;r.length=function(t){for(var i=0,n=0,r=0;r191&&e<224?s[u++]=(31&e)<<6|63&t[i++]:e>239&&e<365?(e=((7&e)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[i++])<<6|63&t[i++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},r.write=function(t,i,n){for(var r,e,o=n,s=0;s>6|192,i[n++]=63&r|128):55296===(64512&r)&&56320===(64512&(e=t.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&e),++s,i[n++]=r>>18|240,i[n++]=r>>12&63|128,i[n++]=r>>6&63|128,i[n++]=63&r|128):(i[n++]=r>>12|224,i[n++]=r>>6&63|128,i[n++]=63&r|128);return n-o}},{}],5:[function(t,i,n){(function(i){"use strict";function r(){e.Reader.a()}var e=i.protobuf=n;e.Writer=t(10),e.BufferWriter=t(11),e.Reader=t(6),e.BufferReader=t(7),e.util=t(9),e.roots={},e.configure=r,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(e.util.Long=t,r()),e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,6:6,7:7,9:9}],6:[function(t,i,n){"use strict";function r(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),i=0;if(this.len-this.pos>4){for(i=0;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(i=0;i<4;++i){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(i=0;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(i=0;i<5;++i){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function s(){return o.call(this).toLong()}function u(){return o.call(this).toNumber()}function h(){return o.call(this).toLong(!0)}function f(){return o.call(this).toNumber(!0)}function l(){return o.call(this).zzDecode().toLong()}function a(){return o.call(this).zzDecode().toNumber()}function c(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw r(this,8);return new A(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function d(){return p.call(this).toLong(!0)}function b(){return p.call(this).toNumber(!0)}function g(){return p.call(this).zzDecode().toLong()}function v(){return p.call(this).zzDecode().toNumber()}function y(){m.Long?(N.int64=s,N.uint64=h,N.sint64=l,N.fixed64=d,N.sfixed64=g):(N.int64=u,N.uint64=f,N.sint64=a,N.fixed64=b,N.sfixed64=v)}i.exports=e;var w,m=t(9),A=m.LongBits,x=m.utf8;e.create=m.Buffer?function(i){return w||(w=t(7)),(e.create=function(t){return new w(t)})(i)}:function(t){return new e(t)};var N=e.prototype;N.b=m.Array.prototype.subarray||m.Array.prototype.slice,N.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),N.int32=function(){return 0|this.uint32()},N.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},N.bool=function(){return 0!==this.uint32()},N.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return c(this.buf,this.pos+=4)},N.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var L="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[3]?function(n,r){return i[0]=n[r],i[1]=n[r+1],i[2]=n[r+2],i[3]=n[r+3],t[0]}:function(n,r){return i[3]=n[r],i[2]=n[r+1],i[1]=n[r+2],i[0]=n[r+3],t[0]}}():function(t,i){var n=c(t,i+4),r=2*(n>>31)+1,e=n>>>23&255,o=8388607&n;return 255===e?o?NaN:r*(1/0):0===e?1.401298464324817e-45*r*o:r*Math.pow(2,e-150)*(o+8388608)};N.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=L(this.buf,this.pos);return this.pos+=4,t};var z="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[7]?function(n,r){return i[0]=n[r],i[1]=n[r+1],i[2]=n[r+2],i[3]=n[r+3],i[4]=n[r+4],i[5]=n[r+5],i[6]=n[r+6],i[7]=n[r+7],t[0]}:function(n,r){return i[7]=n[r],i[6]=n[r+1],i[5]=n[r+2],i[4]=n[r+3],i[3]=n[r+4],i[2]=n[r+5],i[1]=n[r+6],i[0]=n[r+7],t[0]}}():function(t,i){var n=c(t,i+4),r=c(t,i+8),e=2*(r>>31)+1,o=r>>>20&2047,s=4294967296*(1048575&r)+n;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};N.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=z(this.buf,this.pos);return this.pos+=8,t},N.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,i===n?new this.buf.constructor(0):this.b.call(this.buf,i,n)},N.string=function(){var t=this.bytes();return x.read(t,0,t.length)},N.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},N.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},e.a=y,y()},{7:7,9:9}],7:[function(t,i,n){"use strict";function r(t){e.call(this,t)}i.exports=r;var e=t(6),o=r.prototype=Object.create(e.prototype);o.constructor=r;var s=t(9);s.Buffer&&(o.b=s.Buffer.prototype.slice),o.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{6:6,9:9}],8:[function(t,i,n){"use strict";function r(t,i){this.lo=t,this.hi=i}i.exports=r;var e=t(9),o=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var u=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(t){if(0===t)return s;var i=t<0;i&&(t=-t);var n=t>>>0,e=(t-n)/4294967296>>>0;return i&&(e=~e>>>0,n=~n>>>0,++n>4294967295&&(n=0,++e>4294967295&&(e=0))),new r(n,e)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if("string"==typeof t){if(!e.Long)return r.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):s},o.toNumber=function(t){if(!t&&this.hi>>>31){var i=~this.lo+1>>>0,n=~this.hi>>>0;return i||(n=n+1>>>0),-(i+4294967296*n)}return this.lo+4294967296*this.hi},o.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var h=String.prototype.charCodeAt;r.fromHash=function(t){return t===u?s:new r((h.call(t,0)|h.call(t,1)<<8|h.call(t,2)<<16|h.call(t,3)<<24)>>>0,(h.call(t,4)|h.call(t,5)<<8|h.call(t,6)<<16|h.call(t,7)<<24)>>>0)},o.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},o.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},o.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{9:9}],9:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(8),util.base64=require(1),util.inquire=require(2),util.utf8=require(4),util.pool=require(3),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(t){}util.Buffer=function(){try{var t=util.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(i,n){return new t(i,n)}),t.allocUnsafe||(t.allocUnsafe=function(i){return new t(i)}),t):null}catch(t){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.isString=function(t){return"string"==typeof t||t instanceof String},util.isObject=function(t){return t&&"object"==typeof t},util.longToHash=function(t){return t?util.LongBits.from(t).toHash():util.LongBits.zeroHash},util.longFromHash=function(t,i){var n=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(n.lo,n.hi,i):n.toNumber(Boolean(i))},util.longNeq=function(t,i){return"number"==typeof t?"number"==typeof i?t!==i:(t=util.LongBits.fromNumber(t)).lo!==i.low||t.hi!==i.high:"number"==typeof i?(i=util.LongBits.fromNumber(i)).lo!==t.low||i.hi!==t.high:t.low!==i.low||t.high!==i.high},util.longNe=function(t,i,n){if("object"==typeof t)return t.low!==i||t.high!==n;var r=util.LongBits.from(t);return r.lo!==i||r.hi!==n},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},util.props=function(t,i){Object.keys(i).forEach(function(n){util.prop(t,n,i[n])})},util.prop=function(t,i,n){var r=util.ucFirst(i);n.get&&(t["get"+r]=n.get),n.set&&(t["set"+r]=util.isIE8?function(t){n.set.call(this,t),this[i]=t}:n.set),util.isIE8?void 0!==n.value&&(t[i]=n.value):Object.defineProperty(t,i,n)},util.emptyArray=Object.freeze?Object.freeze([]):[],util.emptyObject=Object.freeze?Object.freeze({}):{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,4:4,8:8}],10:[function(t,i,n){"use strict";function r(t,i,n){this.fn=t,this.len=i,this.next=void 0,this.val=n}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new r(e,0,0),this.tail=this.head,this.states=null}function u(t,i,n){i[n]=255&t}function h(t,i,n){for(;t>127;)i[n++]=127&t|128,t>>>=7;i[n]=t}function f(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function l(t,i,n){i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n]=t>>>24}i.exports=s;var a,c=t(9),p=c.LongBits,d=c.base64,b=c.utf8;s.create=c.Buffer?function(){return a||(a=t(11)),(s.create=function(){return new a})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray));var g=s.prototype;g.push=function(t,i,n){return this.tail=this.tail.next=new r(t,i,n),this.len+=i,this},g.uint32=function(t){return t>>>=0,this.push(h,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},g.int32=function(t){return t<0?this.push(f,10,p.fromNumber(t)):this.uint32(t)},g.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},g.uint64=function(t){var i=p.from(t);return this.push(f,i.length(),i)},g.int64=g.uint64,g.sint64=function(t){var i=p.from(t).zzEncode();return this.push(f,i.length(),i)},g.bool=function(t){return this.push(u,1,t?1:0)},g.fixed32=function(t){return this.push(l,4,t>>>0)},g.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},g.fixed64=function(t){var i=p.from(t);return this.push(l,4,i.lo).push(l,4,i.hi)},g.sfixed64=function(t){var i=p.from(t).zzEncode();return this.push(l,4,i.lo).push(l,4,i.hi)};var v="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[3]?function(n,r,e){t[0]=n,r[e++]=i[0],r[e++]=i[1],r[e++]=i[2],r[e]=i[3]}:function(n,r,e){t[0]=n,r[e++]=i[3],r[e++]=i[2],r[e++]=i[1],r[e]=i[0]}}():function(t,i,n){var r=t<0?1:0;if(r&&(t=-t),0===t)l(1/t>0?0:2147483648,i,n);else if(isNaN(t))l(2147483647,i,n);else if(t>3.4028234663852886e38)l((r<<31|2139095040)>>>0,i,n);else if(t<1.1754943508222875e-38)l((r<<31|Math.round(t/1.401298464324817e-45))>>>0,i,n);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);l((r<<31|e+127<<23|o)>>>0,i,n)}};g.float=function(t){return this.push(v,4,t)};var y="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),i=new Uint8Array(t.buffer);return t[0]=-0,i[7]?function(n,r,e){t[0]=n,r[e++]=i[0],r[e++]=i[1],r[e++]=i[2],r[e++]=i[3],r[e++]=i[4],r[e++]=i[5],r[e++]=i[6],r[e]=i[7]}:function(n,r,e){t[0]=n,r[e++]=i[7],r[e++]=i[6],r[e++]=i[5],r[e++]=i[4],r[e++]=i[3],r[e++]=i[2],r[e++]=i[1],r[e]=i[0]}}():function(t,i,n){var r=t<0?1:0;if(r&&(t=-t),0===t)l(0,i,n),l(1/t>0?0:2147483648,i,n+4);else if(isNaN(t))l(4294967295,i,n),l(2147483647,i,n+4);else if(t>1.7976931348623157e308)l(0,i,n),l((r<<31|2146435072)>>>0,i,n+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,l(e>>>0,i,n),l((r<<31|e/4294967296)>>>0,i,n+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),l(4503599627370496*e>>>0,i,n),l((r<<31|o+1023<<20|1048576*e&1048575)>>>0,i,n+4)}}};g.double=function(t){return this.push(y,8,t)};var w=c.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;if("string"==typeof t&&i){var n=s.alloc(i=d.length(t));d.decode(t,n,0),t=n}return i?this.uint32(i).push(w,i,t):this.push(u,1,0)},g.string=function(t){var i=b.length(t);return i?this.uint32(i).push(b.write,i,t):this.push(u,1,0)},g.fork=function(){return this.states=new o(this),this.head=this.tail=new r(e,0,0),this.len=0,this},g.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(e,0,0),this.len=0),this},g.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n).tail.next=t.next,this.tail=i,this.len+=n,this},g.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i}},{11:11,9:9}],11:[function(t,i,n){"use strict";function r(){o.call(this)}function e(t,i,n){t.length<40?h.write(t,i,n):i.utf8Write(t,n)}i.exports=r;var o=t(10),s=r.prototype=Object.create(o.prototype);s.constructor=r;var u=t(9),h=u.utf8,f=u.Buffer;r.alloc=function(t){return(r.alloc=f.allocUnsafe)(t)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){t.copy(i,n,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.push(l,i,t),this},s.string=function(t){var i=f.byteLength(t);return this.uint32(i),i&&this.push(e,i,t),this}},{10:10,9:9}]},{},[5]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/runtime/protobuf.min.js.gz b/dist/runtime/protobuf.min.js.gz index d12c40a01ab281d4964690f6a7b6eadcede79b95..3ed2804729bbe6525f41a242277aa94c02c48b20 100644 GIT binary patch literal 5486 zcmV-!6_M&6iwFP!000021Eg1XccZu#|9?LP!#R(Y2AR-ICfL~9d+)nGetU>5f@X>2 zC&4tscYjxaurqzm&LkjR{cbNJ7x(YIXWh3BQq==Gxnd+l&29?CF=^Uz}T52x;wUowG^- z>&1KbiiYoMCb(52MmUl9I8i84q`^m4pnH6yw!@0`t4F!C%FH%UJIm^)2Pz6n(*HF~ zQpXt=3(eCwPKhP08_BH_gx>S9rVB$8BTY*!GEN^`pGqktvOmr_7qwL|zPE10zNx77 zzU?a4e&5E6x|HIvRe0LV%>MTKPk#O8)4#v_{+GW$`~KJOKCwyBX?azqZO@MM$wA0k zrN^#YXdgEI*4yP(g(`16BE}n34-WFI2L{_sy$CIic^%;kqrDR_Zhmm7<|&Fj+JQC6Yo zz7dNr;u-HIX|zx4hf?NGQ4(V!&h|kV;nD9TUSP4II%8@XCTry;^HeS8A*?O~SS7HU z#i^Rjui7{Qldg4}C7?2CB0n zbq-sU_&q)x@zFUxn($E%Pg)Iutbpy>AN9Pwrs-$2>&U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VXW;L+&u@x$Cx6{dQbp~IQp}LJ$ zYy+txFguFxANcYYmopyNn$0>-kI^TcBL8I2kmIsX=7Uk3q_$_k#A+jVD_d16%(M9< z3-lfKRSePEDE+uh9?!fdA9 zZTMk$Ukc94^=I`WQP{xB9-bX2_i~o9dPMY%2{{Mut1$uO33&ldgvdsuTz?e{sv!x!q^}F d@jh=q7sOna`M>M==k>!k{{?NV8wa>V007TD%(nml diff --git a/dist/runtime/protobuf.min.js.map b/dist/runtime/protobuf.min.js.map index b62882ce3..6735c8538 100644 --- a/dist/runtime/protobuf.min.js.map +++ b/dist/runtime/protobuf.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/reader.js","src/reader_buffer.js","src/util/longbits.js","src/util/runtime.js","src/writer.js","src/writer_buffer.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","base64","string","p","charAt","Math","ceil","b64","Array","s64","encode","buffer","start","end","j","b","String","fromCharCode","apply","invalidEncoding","decode","offset","c","charCodeAt","undefined","inquire","moduleName","mod","eval","replace","Object","keys","pool","alloc","slice","size","SIZE","MAX","slab","buf","utf8","len","read","parts","chunk","push","join","write","c1","c2","configure","protobuf","Reader","_configure","global","Writer","BufferWriter","BufferReader","util","roots","define","amd","Long","indexOutOfRange","reader","writeLength","RangeError","pos","this","readLongVarint","bits","LongBits","lo","hi","read_int64_long","toLong","read_int64_number","toNumber","read_uint64_long","read_uint64_number","read_sint64_long","zzDecode","read_sint64_number","readFixed32","readFixed64","read_fixed64_long","read_fixed64_number","read_sfixed64_long","read_sfixed64_number","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","create","Buffer","prototype","_slice","subarray","uint32","value","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","sign","exponent","mantissa","NaN","Infinity","pow","float","readDouble","Float64Array","f64","double","bytes","constructor","skip","skipType","wireType","BufferReaderPrototype","utf8Slice","min","LongBitsPrototype","zero","zzEncode","fromNumber","abs","from","parseInt","fromString","low","high","unsigned","Boolean","fromHash","hash","toHash","mask","part0","part1","part2","isNode","process","versions","node","isIE8","utf8Write","encoding","allocUnsafe","dcodeIO","isInteger","Number","isFinite","floor","isString","isObject","longToHash","longFromHash","fromBits","longNeq","longNe","val","ucFirst","str","toUpperCase","substring","props","target","descriptors","forEach","key","prop","descriptor","ucKey","get","set","defineProperty","emptyArray","freeze","emptyObject","Op","fn","next","noop","State","writer","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","WriterPrototype","writeFloat","isNaN","round","log","LN2","writeDouble","writeBytes","fork","reset","ldelim","finish","writeStringBuffer","BufferWriterPrototype","writeBytesBuffer","name","copy","byteLength"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD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AAiE,OAAAxC,EAAA0C,UACAuH,GAAA3F,YAAArE,CAEA,IAAAE,GAAApE,EAAA,GAEAkD,EAAAkB,EAAAlB,KACAwD,EAAAtC,EAAAsC,MAiBAxC,GAAAvB,MAAA,SAAAE,GACA,OAAAqB,EAAAvB,MAAA+D,EAAA8D,aAAA3H,GAGA,IAAAsL,GAAAzH,GAAAA,EAAAC,oBAAAc,aAAA,QAAAf,EAAAC,UAAAwF,IAAAiC,KACA,SAAA/C,EAAApI,EAAA4B,GACA5B,EAAAkJ,IAAAd,EAAAxG,IAGA,SAAAwG,EAAApI,EAAA4B,GACAwG,EAAAgD,KAAApL,EAAA4B,EAAA,EAAAwG,EAAA7K,QAMA0N,GAAA5F,MAAA,SAAAvB,GACA,gBAAAA,KACAA,EAAAL,EAAAyC,KAAApC,EAAA,UACA,IAAA5D,GAAA4D,EAAAvG,SAAA,CAIA,OAHAsE,MAAAgC,OAAA3D,GACAA,GACA2B,KAAAvB,KAAA4K,EAAAhL,EAAA4D,GACAjC,MAaAoJ,EAAAtN,OAAA,SAAAmG,GACA,GAAA5D,GAAAuD,EAAA4H,WAAAvH,EAIA,OAHAjC,MAAAgC,OAAA3D,GACAA,GACA2B,KAAAvB,KAAA0K,EAAA9K,EAAA4D,GACAjC","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"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\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\";\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 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(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 i ? 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(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","// This file exports just the bare minimum required to work with statically generated code.\r\n// Can be used as a drop-in replacement for the full library as it has the same general structure.\r\n\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\nprotobuf.Writer = require(\"../src/writer\");\r\nprotobuf.BufferWriter = require(\"../src/writer_buffer\");\r\nprotobuf.Reader = require(\"../src/reader\");\r\nprotobuf.BufferReader = require(\"../src/reader_buffer\");\r\nprotobuf.util = require(\"../src/util/runtime\");\r\nprotobuf.roots = {};\r\nprotobuf.configure = configure;\r\n\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(7);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(6);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n if (!BufferWriter)\r\n BufferWriter = require(11);\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(10);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(9);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/base64/index.js","node_modules/@protobufjs/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/reader.js","src/reader_buffer.js","src/util/longbits.js","src/util/runtime.js","src/writer.js","src/writer_buffer.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","base64","string","p","charAt","Math","ceil","b64","Array","s64","encode","buffer","start","end","j","b","String","fromCharCode","apply","invalidEncoding","decode","offset","c","charCodeAt","undefined","inquire","moduleName","mod","eval","replace","Object","keys","pool","alloc","slice","size","SIZE","MAX","slab","buf","utf8","len","read","parts","chunk","push","join","write","c1","c2","configure","protobuf","Reader","_configure","global","Writer","BufferWriter","BufferReader","util","roots","define","amd","Long","indexOutOfRange","reader","writeLength","RangeError","pos","this","readLongVarint","bits","LongBits","lo","hi","read_int64_long","toLong","read_int64_number","toNumber","read_uint64_long","read_uint64_number","read_sint64_long","zzDecode","read_sint64_number","readFixed32","readFixed64","read_fixed64_long","read_fixed64_number","read_sfixed64_long","read_sfixed64_number","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","create","Buffer","prototype","_slice","subarray","uint32","value","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","sign","exponent","mantissa","NaN","Infinity","pow","float","readDouble","Float64Array","f64","double","bytes","constructor","skip","skipType","wireType","BufferReaderPrototype","utf8Slice","min","LongBitsPrototype","zero","zzEncode","zeroHash","fromNumber","from","parseInt","fromString","low","high","unsigned","Boolean","fromHash","hash","toHash","mask","part0","part1","part2","isNode","process","versions","node","isIE8","utf8Write","encoding","allocUnsafe","dcodeIO","isInteger","Number","isFinite","floor","isString","isObject","longToHash","longFromHash","fromBits","longNeq","longNe","val","ucFirst","str","toUpperCase","substring","props","target","descriptors","forEach","key","prop","descriptor","ucKey","get","set","defineProperty","emptyArray","freeze","emptyObject","Op","fn","next","noop","State","writer","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","WriterPrototype","writeFloat","isNaN","round","log","LN2","writeDouble","writeBytes","fork","reset","ldelim","finish","writeStringBuffer","BufferWriterPrototype","writeBytesBuffer","name","copy","byteLength"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAA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AD,GAAAjE,EAAA,IAEAkO,EAAAhK,EAAAyC,UAAAnE,OAAAiE,OAAAxC,EAAA0C,UACAuH,GAAA3F,YAAArE,CAEA,IAAAE,GAAApE,EAAA,GAEAkD,EAAAkB,EAAAlB,KACAwD,EAAAtC,EAAAsC,MAiBAxC,GAAAvB,MAAA,SAAAE,GACA,OAAAqB,EAAAvB,MAAA+D,EAAA8D,aAAA3H,GAGA,IAAAsL,GAAAzH,GAAAA,EAAAC,oBAAAc,aAAA,QAAAf,EAAAC,UAAAwF,IAAAiC,KACA,SAAA/C,EAAApI,EAAA4B,GACA5B,EAAAkJ,IAAAd,EAAAxG,IAGA,SAAAwG,EAAApI,EAAA4B,GACAwG,EAAAgD,KAAApL,EAAA4B,EAAA,EAAAwG,EAAA7K,QAMA0N,GAAA5F,MAAA,SAAAvB,GACA,gBAAAA,KACAA,EAAAL,EAAAyC,KAAApC,EAAA,UACA,IAAA5D,GAAA4D,EAAAvG,SAAA,CAIA,OAHAsE,MAAAgC,OAAA3D,GACAA,GACA2B,KAAAvB,KAAA4K,EAAAhL,EAAA4D,GACAjC,MAaAoJ,EAAAtN,OAAA,SAAAmG,GACA,GAAA5D,GAAAuD,EAAA4H,WAAAvH,EAIA,OAHAjC,MAAAgC,OAAA3D,GACAA,GACA2B,KAAAvB,KAAA0K,EAAA9K,EAAA4D,GACAjC","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 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 string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\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 string[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n string[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n string[i++] = b64[t | b >> 6];\r\n string[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j) {\r\n string[i++] = b64[t];\r\n string[i ] = 61;\r\n if (j === 1)\r\n string[i + 1] = 61;\r\n }\r\n return String.fromCharCode.apply(String, string);\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","\"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\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\";\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 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(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 i ? 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(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","// This file exports just the bare minimum required to work with statically generated code.\r\n// Can be used as a drop-in replacement for the full library as it has the same general structure.\r\n\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\nprotobuf.Writer = require(\"../src/writer\");\r\nprotobuf.BufferWriter = require(\"../src/writer_buffer\");\r\nprotobuf.Reader = require(\"../src/reader\");\r\nprotobuf.BufferReader = require(\"../src/reader_buffer\");\r\nprotobuf.util = require(\"../src/util/runtime\");\r\nprotobuf.roots = {};\r\nprotobuf.configure = configure;\r\n\r\nfunction configure() {\r\n protobuf.Reader._configure();\r\n}\r\n\r\n// Be nice to AMD\r\nif (typeof define === \"function\" && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n configure();\r\n }\r\n return protobuf;\r\n });\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferReader; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n utf8 = util.utf8;\r\n\r\n/* istanbul ignore next */\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Constructs a new reader instance using the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/**\r\n * Creates a new reader using the specified buffer.\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n if (!BufferReader)\r\n BufferReader = require(7);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return new BufferReader(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n return new Reader(buffer);\r\n };\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = (function read_uint32_setup() {\r\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\r\n return function read_uint32() {\r\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\r\n\r\n /* istanbul ignore next */\r\n if ((this.pos += 5) > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this, 10);\r\n }\r\n return value;\r\n };\r\n})();\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n return this.uint32() | 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.uint32();\r\n return value >>> 1 ^ -(value & 1) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n // tends to deopt with local vars for octet etc.\r\n var bits = new LongBits(0 >>> 0, 0 >>> 0);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (i = 0; i < 4; ++i) {\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..4th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 5th\r\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (i = 0; i < 5; ++i) {\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n } else {\r\n for (i = 0; i < 5; ++i) {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 6th..10th\r\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\r\n if (this.buf[this.pos++] < 128)\r\n return bits;\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32(buf, end) {\r\n return (buf[end - 4]\r\n | buf[end - 3] << 8\r\n | buf[end - 2] << 16\r\n | buf[end - 1] << 24) >>> 0;\r\n}\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readFixed64.call(this).toLong(true);\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_fixed64_number() {\r\n return readFixed64.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readFixed64.call(this).zzDecode().toLong();\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction read_sfixed64_number() {\r\n return readFixed64.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\nvar readFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(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 /* istanbul ignore next */\r\n : function readFloat_f32_le(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 : function readFloat_ieee754(buf, pos) {\r\n var uint = readFixed32(buf, pos + 4),\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/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(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 /* istanbul ignore next */\r\n : function readDouble_f64_le(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 : function readDouble_ieee754(buf, pos) {\r\n var lo = readFixed32(buf, pos + 4),\r\n hi = readFixed32(buf, pos + 8);\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/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n\r\n /* istanbul ignore next */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = readDouble(this.buf, this.pos);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.uint32(),\r\n start = this.pos,\r\n end = this.pos + length;\r\n\r\n /* istanbul ignore next */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n var bytes = this.bytes();\r\n return utf8.read(bytes, 0, bytes.length);\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore next */\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n } else {\r\n do {\r\n /* istanbul ignore next */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n if ((wireType = this.uint32() & 7) === 4)\r\n break;\r\n this.skipType(wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n\r\n /* istanbul ignore next */\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\nfunction configure() {\r\n /* istanbul ignore else */\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader._configure = configure;\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\nvar Reader = require(6);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Constructs a new buffer reader instance.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n Reader.call(this, buffer);\r\n}\r\n\r\nif (util.Buffer)\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var len = this.uint32(); // modifies pos\r\n return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(9);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Zero hash.\r\n * @memberof util.LongBits\r\n * @type {string}\r\n */\r\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n if (sign)\r\n value = -value;\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0; \r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.from = function from(value) {\r\n if (typeof value === \"number\")\r\n return LongBits.fromNumber(value);\r\n if (typeof value === \"string\") {\r\n /* istanbul ignore else */\r\n if (util.Long)\r\n value = util.Long.fromString(value);\r\n else\r\n return LongBits.fromNumber(parseInt(value, 10));\r\n }\r\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n var lo = ~this.lo + 1 >>> 0,\r\n hi = ~this.hi >>> 0;\r\n if (!lo)\r\n hi = hi + 1 >>> 0;\r\n return -(lo + hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return util.Long\r\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\r\n /* istanbul ignore next */\r\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n if (hash === zeroHash)\r\n return zero;\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 ,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n return part2 === 0\r\n ? part1 === 0\r\n ? part0 < 16384\r\n ? part0 < 128 ? 1 : 2\r\n : part0 < 2097152 ? 3 : 4\r\n : part1 < 16384\r\n ? part1 < 128 ? 5 : 6\r\n : part1 < 2097152 ? 7 : 8\r\n : part2 < 128 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nutil.LongBits = require(\"./longbits\");\r\nutil.base64 = require(\"@protobufjs/base64\");\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Whether running within IE8 or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nutil.isIE8 = false; try { util.isIE8 = eval(\"!-[1,]\"); } catch (e) {} // eslint-disable-line no-eval, no-empty\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {?function(new: Buffer)}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.prototype.utf8Write) // refuse to use non-node buffers (performance)\r\n return null;\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.from)\r\n Buffer.from = function from(value, encoding) { return new Buffer(value, encoding); };\r\n\r\n /* istanbul ignore next */\r\n if (!Buffer.allocUnsafe)\r\n Buffer.allocUnsafe = function allocUnsafe(size) { return new Buffer(size); };\r\n\r\n return Buffer;\r\n\r\n /* istanbul ignore next */\r\n } catch (e) {\r\n return null;\r\n }\r\n})();\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {?function(new: Uint8Array, *)}\r\n */\r\nutil.Array = typeof Uint8Array === \"undefined\" ? Array : Uint8Array;\r\n\r\n/**\r\n * Long.js's Long class if available.\r\n * @type {?function(new: Long)}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || util.inquire(\"long\");\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nutil.isString = function isString(value) {\r\n return typeof value === \"string\" || value instanceof String;\r\n};\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return value && typeof value === \"object\";\r\n};\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? util.LongBits.from(value).toHash()\r\n : util.LongBits.zeroHash;\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = util.LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n * @deprecated Use {@link util.longNe|longNe} instead\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === \"number\"\r\n ? typeof b === \"number\"\r\n ? a !== b\r\n : (a = util.LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === \"number\"\r\n ? (b = util.LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n\r\n/**\r\n * Tests if a possibily long value equals the specified low and high bits.\r\n * @param {number|string|Long} val Value to test\r\n * @param {number} lo Low bits to test against\r\n * @param {number} hi High bits to test against\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNe = function longNe(val, lo, hi) {\r\n if (typeof val === \"object\") // Long-like, null is invalid and throws\r\n return val.low !== lo || val.high !== hi;\r\n var bits = util.LongBits.from(val);\r\n return bits.lo !== lo || bits.hi !== hi;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to upper case.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n};\r\n\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object.} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object.} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ucKey = util.ucFirst(key);\r\n if (descriptor.get)\r\n target[\"get\" + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target[\"set\" + ucKey] = util.isIE8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (util.isIE8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : [];\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : {};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(9);\r\n\r\nvar BufferWriter; // cyclic\r\n\r\nvar LongBits = util.LongBits,\r\n base64 = util.base64,\r\n utf8 = util.utf8;\r\n\r\n/**\r\n * Constructs a new writer operation instance.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(*, Uint8Array, number)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {*} val Value to write\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, len, val) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {Writer.Op|undefined}\r\n */\r\n this.next = undefined;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val; // type varies\r\n}\r\n\r\n/* istanbul ignore next */\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state instance.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n\r\n /**\r\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = writer.states;\r\n}\r\n\r\n/**\r\n * Constructs a new writer instance.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/**\r\n * Creates a new writer.\r\n * @function\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = util.Buffer\r\n ? function create_buffer_setup() {\r\n if (!BufferWriter)\r\n BufferWriter = require(11);\r\n return (Writer.create = function create_buffer() {\r\n return new BufferWriter();\r\n })();\r\n }\r\n /* istanbul ignore next */\r\n : function create_array() {\r\n return new Writer();\r\n };\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new util.Array(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n this.tail = this.tail.next = new Op(fn, len, val);\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(val, buf, pos) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\nfunction writeVarint32(val, buf, pos) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value = value >>> 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\r\n};\r\n\r\nfunction writeVarint64(val, buf, pos) {\r\n while (val.hi) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function write_sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(val, buf, pos) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\r\n};\r\n\r\nvar writeFloat = typeof Float32Array !== \"undefined\"\r\n ? (function() {\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n /* istanbul ignore next */\r\n : function writeFloat_f32_le(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeFloat_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0)\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(value))\r\n writeFixed32(2147483647, buf, pos);\r\n else if (value > 3.4028234663852886e+38) // +-Infinity\r\n writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (value < 1.1754943508222875e-38) // denormal\r\n writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2),\r\n mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n };\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nvar writeDouble = typeof Float64Array !== \"undefined\"\r\n ? (function() {\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n /* istanbul ignore next */\r\n : function writeDouble_f64_le(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n /* istanbul ignore next */\r\n : function writeDouble_ieee754(value, buf, pos) {\r\n var sign = value < 0 ? 1 : 0;\r\n if (sign)\r\n value = -value;\r\n if (value === 0) {\r\n writeFixed32(0, buf, pos);\r\n writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\r\n } else if (isNaN(value)) {\r\n writeFixed32(4294967295, buf, pos);\r\n writeFixed32(2147483647, buf, pos + 4);\r\n } else if (value > 1.7976931348623157e+308) { // +-Infinity\r\n writeFixed32(0, buf, pos);\r\n writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\r\n } else {\r\n var mantissa;\r\n if (value < 2.2250738585072014e-308) { // denormal\r\n mantissa = value / 5e-324;\r\n writeFixed32(mantissa >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\r\n } else {\r\n var exponent = Math.floor(Math.log(value) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = value * Math.pow(2, -exponent);\r\n writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\r\n writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\r\n }\r\n }\r\n };\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes = util.Array.prototype.set\r\n ? function writeBytes_set(val, buf, pos) {\r\n buf.set(val, pos);\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytes_for(val, buf, pos) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n };\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (typeof value === \"string\" && len) {\r\n var buf = Writer.alloc(len = base64.length(value));\r\n base64.decode(value, buf, 0);\r\n value = buf;\r\n }\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = utf8.length(value);\r\n return len\r\n ? this.uint32(len).push(utf8.write, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.states = new State(this);\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset()\r\n .uint32(len)\r\n .tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = this.constructor.alloc(this.len),\r\n pos = 0;\r\n while (head) {\r\n head.fn(head.val, buf, pos);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n // this.head = this.tail = null;\r\n return buf;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\nvar Writer = require(10);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(9);\r\n\r\nvar utf8 = util.utf8,\r\n Buffer = util.Buffer;\r\n\r\n/**\r\n * Constructs a new buffer writer instance.\r\n * @classdesc Wire format writer using node buffers.\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = Buffer.allocUnsafe)(size);\r\n};\r\n\r\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\r\n ? function writeBytesBuffer_set(val, buf, pos) {\r\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n val.copy(buf, pos, 0, val.length);\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n if (typeof value === \"string\")\r\n value = Buffer.from(value, \"base64\"); // polyfilled\r\n var len = value.length >>> 0;\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeBytesBuffer, len, value);\r\n return this;\r\n};\r\n\r\nfunction writeStringBuffer(val, buf, pos) {\r\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\r\n utf8.write(val, buf, pos);\r\n else\r\n buf.utf8Write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\r\n var len = Buffer.byteLength(value);\r\n this.uint32(len);\r\n if (len)\r\n this.push(writeStringBuffer, len, value);\r\n return this;\r\n};\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/package.json b/package.json index c6e1d9f16..9c3a10057 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "protobufjs", - "version": "6.3.1", + "version": "6.3.2", "description": "Protocol Buffers for JavaScript (& TypeScript).", "author": "Daniel Wirtz ", "license": "BSD-3-Clause", @@ -28,13 +28,14 @@ "bench": "node bench", "build": "gulp", "changelog": "node scripts/changelog -w", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js", "docs": "jsdoc -c jsdoc.docs.json -R README.md", "lint": "eslint src runtime", "pages": "node scripts/pages", "prepublish": "node scripts/prepublish", "prof": "node bench/prof", "test": "tape tests/*.js | tap-spec", - "types": "node bin/pbts --name protobufjs --out types/protobuf.js.d.ts src && tsc types/test.ts --lib es2015 --noEmit", + "types": "node bin/pbts --name protobufjs --out types/protobuf.js.d.ts src && node node_modules/typescript/bin/tsc types/test.ts --lib es2015 --noEmit", "zuul": "zuul --ui tape --no-coverage --concurrency 4 -- tests/*.js", "zuul-local": "zuul --ui tape --concurrency 1 --local 8080 --disable-tunnel -- tests/*.js", "make": "npm run lint && npm run test && npm run types && npm run build", diff --git a/src/common.js b/src/common.js index 04f128c32..472ed044b 100644 --- a/src/common.js +++ b/src/common.js @@ -6,14 +6,14 @@ module.exports = common; * Provides common type definitions. * Can also be used to provide additional google types or your own custom types. * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition * @returns {undefined} - * @property {Object} google/protobuf/any.proto Any - * @property {Object} google/protobuf/duration.proto Duration - * @property {Object} google/protobuf/empty.proto Empty - * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {Object} google/protobuf/timestamp.proto Timestamp - * @property {Object} google/protobuf/wrappers.proto Wrappers + * @property {Object.} google/protobuf/any.proto Any + * @property {Object.} google/protobuf/duration.proto Duration + * @property {Object.} google/protobuf/empty.proto Empty + * @property {Object.} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {Object.} google/protobuf/timestamp.proto Timestamp + * @property {Object.} google/protobuf/wrappers.proto Wrappers */ function common(name, json) { if (!/\/|\./.test(name)) { diff --git a/src/convert.js b/src/convert.js index f429fd3bb..554004a55 100644 --- a/src/convert.js +++ b/src/convert.js @@ -99,7 +99,7 @@ convert.toJson = function toJson(field, value, options) { if (options.longs === String) { if(typeof value === "number") return util.Long.fromNumber(value, unsigned).toString(); - value = util.Long.fromValue(value); // TODO: fromValue is missing an unsigned option (long.js 3.2.0) + value = util.Long.fromValue(value); // has no unsigned option value.unsigned = unsigned; return value.toString(); } diff --git a/src/enum.js b/src/enum.js index 9167dae84..97ab60772 100644 --- a/src/enum.js +++ b/src/enum.js @@ -18,7 +18,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Unique name within its namespace * @param {Object.} [values] Enum values as an object, by name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Enum(name, values, options) { ReflectionObject.call(this, name, options); diff --git a/src/field.js b/src/field.js index 8d9ab7d2e..79665743d 100644 --- a/src/field.js +++ b/src/field.js @@ -24,9 +24,9 @@ var TypeError = util._TypeError; * @param {string} name Unique name within its namespace * @param {number} id Unique id within its namespace * @param {string} type Value type - * @param {string|Object} [rule="optional"] Field rule - * @param {string|Object} [extend] Extended type if different from parent - * @param {Object} [options] Declared options + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options */ function Field(name, id, type, rule, extend, options) { if (util.isObject(rule)) { @@ -201,7 +201,7 @@ Field.testJSON = function testJSON(json) { /** * Constructs a field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Field} Created field * @throws {TypeError} If arguments are invalid */ diff --git a/src/index.js b/src/index.js index 1ee4fcd5a..3167e0c01 100644 --- a/src/index.js +++ b/src/index.js @@ -113,6 +113,7 @@ protobuf.rpc = require("./rpc"); protobuf.util = require("./util"); protobuf.configure = configure; +/* istanbul ignore next */ /** * Reconfigures the library according to the environment. * @returns {undefined} @@ -121,6 +122,7 @@ function configure() { protobuf.Reader._configure(); } +/* istanbul ignore next */ // Be nice to AMD if (typeof define === "function" && define.amd) define(["long"], function(Long) { diff --git a/src/mapfield.js b/src/mapfield.js index ec69ca0e8..f8314fc9c 100644 --- a/src/mapfield.js +++ b/src/mapfield.js @@ -21,7 +21,7 @@ var types = require("./types"), * @param {number} id Unique id within its namespace * @param {string} keyType Key type * @param {string} type Value type - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function MapField(name, id, keyType, type, options) { Field.call(this, name, id, type, options); @@ -48,7 +48,7 @@ function MapField(name, id, keyType, type, options) { /** * Tests if the specified JSON object describes a map field. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a field */ MapField.testJSON = function testJSON(json) { @@ -58,7 +58,7 @@ MapField.testJSON = function testJSON(json) { /** * Constructs a map field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created map field * @throws {TypeError} If arguments are invalid */ diff --git a/src/message.js b/src/message.js index 79b0d4f8e..9f822bb54 100644 --- a/src/message.js +++ b/src/message.js @@ -6,12 +6,10 @@ var convert = require("./convert"); /** * Constructs a new message instance. * - * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`. + * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`. * @classdesc Abstract runtime message. - * @extends {Object} * @constructor * @param {Object.} [properties] Properties to set - * @abstract * @see {@link Class.create} */ function Message(properties) { diff --git a/src/method.js b/src/method.js index ab0ee0565..575206096 100644 --- a/src/method.js +++ b/src/method.js @@ -21,14 +21,16 @@ var TypeError = util._TypeError; * @param {string|undefined} type Method type, usually `"rpc"` * @param {string} requestType Request message type * @param {string} responseType Response message type - * @param {boolean|Object} [requestStream] Whether the request is streamed - * @param {boolean|Object} [responseStream] Whether the response is streamed - * @param {Object} [options] Declared options + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options */ function Method(name, type, requestType, responseType, requestStream, responseStream, options) { + /* istanbul ignore next */ if (util.isObject(requestStream)) { options = requestStream; requestStream = responseStream = undefined; + /* istanbul ignore next */ } else if (util.isObject(responseStream)) { options = responseStream; responseStream = undefined; @@ -91,7 +93,7 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /** * Tests if the specified JSON object describes a service method. - * @param {Object} json JSON object + * @param {*} json JSON object * @returns {boolean} `true` if the object describes a map field */ Method.testJSON = function testJSON(json) { @@ -101,7 +103,7 @@ Method.testJSON = function testJSON(json) { /** * Constructs a service method from JSON. * @param {string} name Method name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Method} Created method * @throws {TypeError} If arguments are invalid */ diff --git a/src/namespace.js b/src/namespace.js index f19783966..fb7ace9f2 100644 --- a/src/namespace.js +++ b/src/namespace.js @@ -38,7 +38,7 @@ var TypeError = util._TypeError; * @extends ReflectionObject * @constructor * @param {string} name Namespace name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Namespace(name, options) { ReflectionObject.call(this, name, options); @@ -107,7 +107,7 @@ Namespace.testJSON = function testJSON(json) { /** * Constructs a namespace from JSON. * @param {string} name Namespace name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Namespace} Created namespace * @throws {TypeError} If arguments are invalid */ diff --git a/src/object.js b/src/object.js index 585fb07f8..a2472cf10 100644 --- a/src/object.js +++ b/src/object.js @@ -15,7 +15,7 @@ var TypeError = util._TypeError; * @classdesc Base class of all reflection objects. * @constructor * @param {string} name Object name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options * @abstract */ function ReflectionObject(name, options) { @@ -93,7 +93,7 @@ util.props(ReflectionObjectPrototype, { /** * Converts this reflection object to its JSON representation. - * @returns {Object} JSON object + * @returns {Object.} JSON object * @abstract */ ReflectionObjectPrototype.toJSON = function toJSON() { diff --git a/src/oneof.js b/src/oneof.js index 0a06edfde..29deaee46 100644 --- a/src/oneof.js +++ b/src/oneof.js @@ -19,7 +19,7 @@ var TypeError = util._TypeError; * @constructor * @param {string} name Oneof name * @param {string[]|Object} [fieldNames] Field names - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function OneOf(name, fieldNames, options) { if (!Array.isArray(fieldNames)) { @@ -76,7 +76,7 @@ OneOf.testJSON = function testJSON(json) { /** * Constructs a oneof from JSON. * @param {string} name Oneof name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created oneof * @throws {TypeError} If arguments are invalid */ diff --git a/src/parse.js b/src/parse.js index 17858df7b..b3de3b4cd 100644 --- a/src/parse.js +++ b/src/parse.js @@ -38,7 +38,7 @@ function camelCase(str) { /** * Result object returned from {@link parse}. * @typedef ParserResult - * @type {Object} + * @type {Object.} * @property {string|undefined} package Package name, if declared * @property {string[]|undefined} imports Imports, if any * @property {string[]|undefined} weakImports Weak imports, if any @@ -49,7 +49,7 @@ function camelCase(str) { /** * Options modifying the behavior of {@link parse}. * @typedef ParseOptions - * @type {Object} + * @type {Object.} * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case */ diff --git a/src/root.js b/src/root.js index cba05fb8f..d11bc005d 100644 --- a/src/root.js +++ b/src/root.js @@ -18,7 +18,7 @@ var parse, // cyclic, might be excluded * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. * @extends Namespace * @constructor - * @param {Object} [options] Top level options + * @param {Object.} [options] Top level options */ function Root(options) { Namespace.call(this, "", options); @@ -38,11 +38,12 @@ function Root(options) { /** * Loads a JSON definition into a root namespace. - * @param {*} json JSON definition + * @param {Object.|*} json JSON definition * @param {Root} [root] Root namespace, defaults to create a new one if omitted * @returns {Root} Root namespace */ Root.fromJSON = function fromJSON(json, root) { + // note that `json` actually must be of type `Object.` but TypeScript if (!root) root = new Root(); return root.setOptions(json.options).addJSON(json.nested); diff --git a/src/service.js b/src/service.js index d49394f87..48162b0ee 100644 --- a/src/service.js +++ b/src/service.js @@ -62,7 +62,7 @@ function clearCache(service) { /** * Tests if the specified JSON object describes a service. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a service */ Service.testJSON = function testJSON(json) { @@ -72,7 +72,7 @@ Service.testJSON = function testJSON(json) { /** * Constructs a service from JSON. * @param {string} name Service name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ diff --git a/src/tokenize.js b/src/tokenize.js index 4b7e112b3..3273891d8 100644 --- a/src/tokenize.js +++ b/src/tokenize.js @@ -21,7 +21,7 @@ function unescape(str) { /** * Handle object returned from {@link tokenize}. - * @typedef {Object} TokenizerHandle + * @typedef {Object.} TokenizerHandle * @property {function():number} line Gets the current line number * @property {function():?string} next Gets the next token and advances (`null` on eof) * @property {function():?string} peek Peeks for the next token (`null` on eof) diff --git a/src/type.js b/src/type.js index 0cc62d567..b62d8f67d 100644 --- a/src/type.js +++ b/src/type.js @@ -30,7 +30,7 @@ var encoder, // might become cyclic * @extends Namespace * @constructor * @param {string} name Message name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ function Type(name, options) { Namespace.call(this, name, options); @@ -206,7 +206,7 @@ var nestedTypes = [ Enum, Type, Field, Service ]; /** * Creates a type from JSON. * @param {string} name Message name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Type} Created message type */ Type.fromJSON = function fromJSON(name, json) { @@ -331,7 +331,7 @@ TypePrototype.remove = function remove(object) { /** * Creates a new message of this type using the specified properties. - * @param {Object} [properties] Properties to set + * @param {Object.} [properties] Properties to set * @returns {Message} Runtime message */ TypePrototype.create = function create(properties) { @@ -340,7 +340,7 @@ TypePrototype.create = function create(properties) { /** * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types. - * @param {Object} object JSON object + * @param {Object.} object JSON object * @param {MessageConversionOptions} [options] Conversion options * @returns {Message} Runtime message */ diff --git a/src/util.js b/src/util.js index 47560652d..12e38aad3 100644 --- a/src/util.js +++ b/src/util.js @@ -15,7 +15,7 @@ util.path = require("@protobufjs/path"); /** * Node's fs module if available. - * @type {Object} + * @type {Object.} */ util.fs = util.inquire("fs"); @@ -48,10 +48,10 @@ util._TypeError = function(name, description) { /** * Merges the properties of the source object into the destination object. - * @param {Object} dst Destination object - * @param {Object} src Source object + * @param {Object.} dst Destination object + * @param {Object.} src Source object * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object} Destination object + * @returns {Object.} Destination object */ util.merge = function merge(dst, src, ifNotSet) { if (src) { diff --git a/src/util/aspromise/index.js b/src/util/aspromise/index.js index 79c36a62a..9c05902a6 100644 --- a/src/util/aspromise/index.js +++ b/src/util/aspromise/index.js @@ -5,7 +5,7 @@ module.exports = asPromise; * Returns a promise from a node-style callback function. * @memberof util * @param {function(?Error, ...*)} fn Function to call - * @param {Object} ctx Function context + * @param {*} ctx Function context * @param {...*} params Function arguments * @returns {Promise<*>} Promisified function */ diff --git a/src/util/codegen/index.js b/src/util/codegen/index.js index 037b2f5c3..0c8db2c49 100644 --- a/src/util/codegen/index.js +++ b/src/util/codegen/index.js @@ -86,7 +86,7 @@ function codegen() { /** * Ends generation and builds the function whilst applying a scope. * @param {string} [name] Function name, defaults to generate an anonymous function - * @param {Object} [scope] Function scope + * @param {Object.} [scope] Function scope * @returns {function} The generated function, with scope applied if specified * @inner */ diff --git a/src/util/eventemitter/index.js b/src/util/eventemitter/index.js index f4d65bc7a..4fd13ed07 100644 --- a/src/util/eventemitter/index.js +++ b/src/util/eventemitter/index.js @@ -24,7 +24,7 @@ var EventEmitterPrototype = EventEmitter.prototype; * Registers an event listener. * @param {string} evt Event name * @param {function} fn Listener - * @param {Object} [ctx] Listener context + * @param {*} [ctx] Listener context * @returns {util.EventEmitter} `this` */ EventEmitterPrototype.on = function on(evt, fn, ctx) { diff --git a/src/util/extend/index.js b/src/util/extend/index.js index 3d6b570d9..164152866 100644 --- a/src/util/extend/index.js +++ b/src/util/extend/index.js @@ -5,7 +5,7 @@ module.exports = extend; * Lets the specified constructor extend `this` class. * @memberof util * @param {*} ctor Extending constructor - * @returns {Object} Constructor prototype + * @returns {Object.} Constructor prototype * @this Function */ function extend(ctor) { diff --git a/src/util/longbits.js b/src/util/longbits.js index 78a271c7c..40768f4fe 100644 --- a/src/util/longbits.js +++ b/src/util/longbits.js @@ -50,6 +50,13 @@ zero.toNumber = function() { return 0; }; zero.zzEncode = zero.zzDecode = function() { return this; }; zero.length = function() { return 1; }; +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + /** * Constructs new long bits from the specified number. * @param {number} value Value @@ -58,10 +65,11 @@ zero.length = function() { return 1; }; LongBits.fromNumber = function fromNumber(value) { if (value === 0) return zero; - var sign = value < 0; - value = Math.abs(value); + var sign = value < 0; + if (sign) + value = -value; var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; + hi = (value - lo) / 4294967296 >>> 0; if (sign) { hi = ~hi >>> 0; lo = ~lo >>> 0; @@ -83,6 +91,7 @@ LongBits.from = function from(value) { if (typeof value === "number") return LongBits.fromNumber(value); if (typeof value === "string") { + /* istanbul ignore else */ if (util.Long) value = util.Long.fromString(value); else @@ -98,11 +107,11 @@ LongBits.from = function from(value) { */ LongBitsPrototype.toNumber = function toNumber(unsigned) { if (!unsigned && this.hi >>> 31) { - this.lo = ~this.lo + 1 >>> 0; - this.hi = ~this.hi >>> 0; - if (!this.lo) - this.hi = this.hi + 1 >>> 0; - return -(this.lo + this.hi * 4294967296); + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); } return this.lo + this.hi * 4294967296; }; @@ -115,6 +124,7 @@ LongBitsPrototype.toNumber = function toNumber(unsigned) { LongBitsPrototype.toLong = function toLong(unsigned) { return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; }; @@ -126,6 +136,8 @@ var charCodeAt = String.prototype.charCodeAt; * @returns {util.LongBits} Bits */ LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; return new LongBits( ( charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 diff --git a/src/util/runtime.js b/src/util/runtime.js index f21461f96..c8d2ed01c 100644 --- a/src/util/runtime.js +++ b/src/util/runtime.js @@ -98,7 +98,7 @@ util.isObject = function isObject(value) { util.longToHash = function longToHash(value) { return value ? util.LongBits.from(value).toHash() - : "\0\0\0\0\0\0\0\0"; + : util.LongBits.zeroHash; }; /** @@ -157,7 +157,7 @@ util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util /** * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object - * @param {Object} descriptors Property descriptors + * @param {Object.} descriptors Property descriptors * @returns {undefined} */ util.props = function props(target, descriptors) { @@ -170,7 +170,7 @@ util.props = function props(target, descriptors) { * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object * @param {string} key Property name - * @param {Object} descriptor Property descriptor + * @param {Object.} descriptor Property descriptor * @returns {undefined} */ util.prop = function prop(target, key, descriptor) { diff --git a/tests/data/test.d.ts b/tests/data/test.d.ts new file mode 100644 index 000000000..c486c1aec --- /dev/null +++ b/tests/data/test.d.ts @@ -0,0 +1,4735 @@ +/// +// $> pbts tests\data\test.js +// Generated Tue, 27 Dec 2016 22:59:45 UTC +/** + * Namespace jspb. + * @exports jspb + * @namespace + */ +declare module jspb { + + /** + * Namespace test. + * @exports jspb.test + * @namespace + */ + module test { + + /** + * Constructs a new Empty. + * @exports jspb.test.Empty + * @constructor + * @param {Object} [properties] Properties to set + */ + class Empty { + + /** + * Constructs a new Empty. + * @exports jspb.test.Empty + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new Empty instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Empty} Empty instance + */ + static create(properties?: Object): jspb.test.Empty; + + /** + * Encodes the specified Empty. + * @function + * @param {jspb.test.Empty|Object} message Empty or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Empty|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Empty, length delimited. + * @param {jspb.test.Empty|Object} message Empty or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Empty|Object), writer?: Writer): Writer; + + /** + * Decodes a Empty from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Empty} Empty + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Empty; + + /** + * Decodes a Empty from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Empty} Empty + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Empty; + + /** + * Verifies a Empty. + * @function + * @param {jspb.test.Empty|Object} message Empty or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Empty|Object)): string; + } + + /** + * Constructs a new EnumContainer. + * @exports jspb.test.EnumContainer + * @constructor + * @param {Object} [properties] Properties to set + */ + class EnumContainer { + + /** + * Constructs a new EnumContainer. + * @exports jspb.test.EnumContainer + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * EnumContainer outerEnum. + * @type {number} + */ + outerEnum: number; + + /** + * Creates a new EnumContainer instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.EnumContainer} EnumContainer instance + */ + static create(properties?: Object): jspb.test.EnumContainer; + + /** + * Encodes the specified EnumContainer. + * @function + * @param {jspb.test.EnumContainer|Object} message EnumContainer or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.EnumContainer|Object), writer?: Writer): Writer; + + /** + * Encodes the specified EnumContainer, length delimited. + * @param {jspb.test.EnumContainer|Object} message EnumContainer or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.EnumContainer|Object), writer?: Writer): Writer; + + /** + * Decodes a EnumContainer from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.EnumContainer} EnumContainer + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.EnumContainer; + + /** + * Decodes a EnumContainer from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.EnumContainer} EnumContainer + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.EnumContainer; + + /** + * Verifies a EnumContainer. + * @function + * @param {jspb.test.EnumContainer|Object} message EnumContainer or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.EnumContainer|Object)): string; + } + + /** + * Constructs a new Simple1. + * @exports jspb.test.Simple1 + * @constructor + * @param {Object} [properties] Properties to set + */ + class Simple1 { + + /** + * Constructs a new Simple1. + * @exports jspb.test.Simple1 + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Simple1 aString. + * @type {string} + */ + aString: string; + + /** + * Simple1 aRepeatedString. + * @type {Array.} + */ + aRepeatedString: string[]; + + /** + * Simple1 aBoolean. + * @type {boolean} + */ + aBoolean: boolean; + + /** + * Creates a new Simple1 instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Simple1} Simple1 instance + */ + static create(properties?: Object): jspb.test.Simple1; + + /** + * Encodes the specified Simple1. + * @function + * @param {jspb.test.Simple1|Object} message Simple1 or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Simple1|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Simple1, length delimited. + * @param {jspb.test.Simple1|Object} message Simple1 or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Simple1|Object), writer?: Writer): Writer; + + /** + * Decodes a Simple1 from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Simple1} Simple1 + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Simple1; + + /** + * Decodes a Simple1 from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Simple1} Simple1 + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Simple1; + + /** + * Verifies a Simple1. + * @function + * @param {jspb.test.Simple1|Object} message Simple1 or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Simple1|Object)): string; + } + + /** + * Constructs a new Simple2. + * @exports jspb.test.Simple2 + * @constructor + * @param {Object} [properties] Properties to set + */ + class Simple2 { + + /** + * Constructs a new Simple2. + * @exports jspb.test.Simple2 + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Simple2 aString. + * @type {string} + */ + aString: string; + + /** + * Simple2 aRepeatedString. + * @type {Array.} + */ + aRepeatedString: string[]; + + /** + * Creates a new Simple2 instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Simple2} Simple2 instance + */ + static create(properties?: Object): jspb.test.Simple2; + + /** + * Encodes the specified Simple2. + * @function + * @param {jspb.test.Simple2|Object} message Simple2 or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Simple2|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Simple2, length delimited. + * @param {jspb.test.Simple2|Object} message Simple2 or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Simple2|Object), writer?: Writer): Writer; + + /** + * Decodes a Simple2 from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Simple2} Simple2 + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Simple2; + + /** + * Decodes a Simple2 from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Simple2} Simple2 + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Simple2; + + /** + * Verifies a Simple2. + * @function + * @param {jspb.test.Simple2|Object} message Simple2 or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Simple2|Object)): string; + } + + /** + * Constructs a new SpecialCases. + * @exports jspb.test.SpecialCases + * @constructor + * @param {Object} [properties] Properties to set + */ + class SpecialCases { + + /** + * Constructs a new SpecialCases. + * @exports jspb.test.SpecialCases + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * SpecialCases normal. + * @type {string} + */ + normal: string; + + /** + * SpecialCases default. + * @name jspb.test.SpecialCases#default + * @type {string} + */ + default: string; + + /** + * SpecialCases function. + * @name jspb.test.SpecialCases#function + * @type {string} + */ + function: string; + + /** + * SpecialCases var. + * @name jspb.test.SpecialCases#var + * @type {string} + */ + var: string; + + /** + * Creates a new SpecialCases instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.SpecialCases} SpecialCases instance + */ + static create(properties?: Object): jspb.test.SpecialCases; + + /** + * Encodes the specified SpecialCases. + * @function + * @param {jspb.test.SpecialCases|Object} message SpecialCases or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.SpecialCases|Object), writer?: Writer): Writer; + + /** + * Encodes the specified SpecialCases, length delimited. + * @param {jspb.test.SpecialCases|Object} message SpecialCases or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.SpecialCases|Object), writer?: Writer): Writer; + + /** + * Decodes a SpecialCases from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.SpecialCases} SpecialCases + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.SpecialCases; + + /** + * Decodes a SpecialCases from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.SpecialCases} SpecialCases + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.SpecialCases; + + /** + * Verifies a SpecialCases. + * @function + * @param {jspb.test.SpecialCases|Object} message SpecialCases or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.SpecialCases|Object)): string; + } + + /** + * Constructs a new OptionalFields. + * @exports jspb.test.OptionalFields + * @constructor + * @param {Object} [properties] Properties to set + */ + class OptionalFields { + + /** + * Constructs a new OptionalFields. + * @exports jspb.test.OptionalFields + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * OptionalFields aString. + * @type {string} + */ + aString: string; + + /** + * OptionalFields aBool. + * @type {boolean} + */ + aBool: boolean; + + /** + * OptionalFields aNestedMessage. + * @type {jspb.test.OptionalFields.Nested} + */ + aNestedMessage: jspb.test.OptionalFields.Nested; + + /** + * OptionalFields aRepeatedMessage. + * @type {Array.} + */ + aRepeatedMessage: jspb.test.OptionalFields.Nested[]; + + /** + * OptionalFields aRepeatedString. + * @type {Array.} + */ + aRepeatedString: string[]; + + /** + * Creates a new OptionalFields instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.OptionalFields} OptionalFields instance + */ + static create(properties?: Object): jspb.test.OptionalFields; + + /** + * Encodes the specified OptionalFields. + * @function + * @param {jspb.test.OptionalFields|Object} message OptionalFields or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.OptionalFields|Object), writer?: Writer): Writer; + + /** + * Encodes the specified OptionalFields, length delimited. + * @param {jspb.test.OptionalFields|Object} message OptionalFields or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.OptionalFields|Object), writer?: Writer): Writer; + + /** + * Decodes a OptionalFields from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.OptionalFields} OptionalFields + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.OptionalFields; + + /** + * Decodes a OptionalFields from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.OptionalFields} OptionalFields + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.OptionalFields; + + /** + * Verifies a OptionalFields. + * @function + * @param {jspb.test.OptionalFields|Object} message OptionalFields or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.OptionalFields|Object)): string; + } + + + /** + * Constructs a new OptionalFields. + * @exports jspb.test.OptionalFields + * @constructor + * @param {Object} [properties] Properties to set + */ + module OptionalFields { + + /** + * Constructs a new Nested. + * @exports jspb.test.OptionalFields.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + class Nested { + + /** + * Constructs a new Nested. + * @exports jspb.test.OptionalFields.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Nested anInt. + * @type {number} + */ + anInt: number; + + /** + * Creates a new Nested instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.OptionalFields.Nested} Nested instance + */ + static create(properties?: Object): jspb.test.OptionalFields.Nested; + + /** + * Encodes the specified Nested. + * @function + * @param {jspb.test.OptionalFields.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.OptionalFields.Nested|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Nested, length delimited. + * @param {jspb.test.OptionalFields.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.OptionalFields.Nested|Object), writer?: Writer): Writer; + + /** + * Decodes a Nested from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.OptionalFields.Nested} Nested + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.OptionalFields.Nested; + + /** + * Decodes a Nested from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.OptionalFields.Nested} Nested + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.OptionalFields.Nested; + + /** + * Verifies a Nested. + * @function + * @param {jspb.test.OptionalFields.Nested|Object} message Nested or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.OptionalFields.Nested|Object)): string; + } + } + + /** + * Constructs a new HasExtensions. + * @exports jspb.test.HasExtensions + * @constructor + * @param {Object} [properties] Properties to set + */ + class HasExtensions { + + /** + * Constructs a new HasExtensions. + * @exports jspb.test.HasExtensions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * HasExtensions str1. + * @type {string} + */ + str1: string; + + /** + * HasExtensions str2. + * @type {string} + */ + str2: string; + + /** + * HasExtensions str3. + * @type {string} + */ + str3: string; + + /** + * Creates a new HasExtensions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.HasExtensions} HasExtensions instance + */ + static create(properties?: Object): jspb.test.HasExtensions; + + /** + * Encodes the specified HasExtensions. + * @function + * @param {jspb.test.HasExtensions|Object} message HasExtensions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.HasExtensions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified HasExtensions, length delimited. + * @param {jspb.test.HasExtensions|Object} message HasExtensions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.HasExtensions|Object), writer?: Writer): Writer; + + /** + * Decodes a HasExtensions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.HasExtensions} HasExtensions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.HasExtensions; + + /** + * Decodes a HasExtensions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.HasExtensions} HasExtensions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.HasExtensions; + + /** + * Verifies a HasExtensions. + * @function + * @param {jspb.test.HasExtensions|Object} message HasExtensions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.HasExtensions|Object)): string; + } + + /** + * Constructs a new Complex. + * @exports jspb.test.Complex + * @constructor + * @param {Object} [properties] Properties to set + */ + class Complex { + + /** + * Constructs a new Complex. + * @exports jspb.test.Complex + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Complex aString. + * @type {string} + */ + aString: string; + + /** + * Complex anOutOfOrderBool. + * @type {boolean} + */ + anOutOfOrderBool: boolean; + + /** + * Complex aNestedMessage. + * @type {jspb.test.Complex.Nested} + */ + aNestedMessage: jspb.test.Complex.Nested; + + /** + * Complex aRepeatedMessage. + * @type {Array.} + */ + aRepeatedMessage: jspb.test.Complex.Nested[]; + + /** + * Complex aRepeatedString. + * @type {Array.} + */ + aRepeatedString: string[]; + + /** + * Creates a new Complex instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Complex} Complex instance + */ + static create(properties?: Object): jspb.test.Complex; + + /** + * Encodes the specified Complex. + * @function + * @param {jspb.test.Complex|Object} message Complex or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Complex|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Complex, length delimited. + * @param {jspb.test.Complex|Object} message Complex or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Complex|Object), writer?: Writer): Writer; + + /** + * Decodes a Complex from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Complex} Complex + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Complex; + + /** + * Decodes a Complex from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Complex} Complex + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Complex; + + /** + * Verifies a Complex. + * @function + * @param {jspb.test.Complex|Object} message Complex or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Complex|Object)): string; + } + + + /** + * Constructs a new Complex. + * @exports jspb.test.Complex + * @constructor + * @param {Object} [properties] Properties to set + */ + module Complex { + + /** + * Constructs a new Nested. + * @exports jspb.test.Complex.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + class Nested { + + /** + * Constructs a new Nested. + * @exports jspb.test.Complex.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Nested anInt. + * @type {number} + */ + anInt: number; + + /** + * Creates a new Nested instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Complex.Nested} Nested instance + */ + static create(properties?: Object): jspb.test.Complex.Nested; + + /** + * Encodes the specified Nested. + * @function + * @param {jspb.test.Complex.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Complex.Nested|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Nested, length delimited. + * @param {jspb.test.Complex.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Complex.Nested|Object), writer?: Writer): Writer; + + /** + * Decodes a Nested from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Complex.Nested} Nested + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Complex.Nested; + + /** + * Decodes a Nested from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Complex.Nested} Nested + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Complex.Nested; + + /** + * Verifies a Nested. + * @function + * @param {jspb.test.Complex.Nested|Object} message Nested or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Complex.Nested|Object)): string; + } + } + + /** + * Constructs a new OuterMessage. + * @exports jspb.test.OuterMessage + * @constructor + * @param {Object} [properties] Properties to set + */ + class OuterMessage { + + /** + * Constructs a new OuterMessage. + * @exports jspb.test.OuterMessage + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new OuterMessage instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.OuterMessage} OuterMessage instance + */ + static create(properties?: Object): jspb.test.OuterMessage; + + /** + * Encodes the specified OuterMessage. + * @function + * @param {jspb.test.OuterMessage|Object} message OuterMessage or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.OuterMessage|Object), writer?: Writer): Writer; + + /** + * Encodes the specified OuterMessage, length delimited. + * @param {jspb.test.OuterMessage|Object} message OuterMessage or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.OuterMessage|Object), writer?: Writer): Writer; + + /** + * Decodes a OuterMessage from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.OuterMessage} OuterMessage + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.OuterMessage; + + /** + * Decodes a OuterMessage from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.OuterMessage} OuterMessage + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.OuterMessage; + + /** + * Verifies a OuterMessage. + * @function + * @param {jspb.test.OuterMessage|Object} message OuterMessage or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.OuterMessage|Object)): string; + } + + + /** + * Constructs a new OuterMessage. + * @exports jspb.test.OuterMessage + * @constructor + * @param {Object} [properties] Properties to set + */ + module OuterMessage { + + /** + * Constructs a new Complex. + * @exports jspb.test.OuterMessage.Complex + * @constructor + * @param {Object} [properties] Properties to set + */ + class Complex { + + /** + * Constructs a new Complex. + * @exports jspb.test.OuterMessage.Complex + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Complex innerComplexField. + * @type {number} + */ + innerComplexField: number; + + /** + * Creates a new Complex instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.OuterMessage.Complex} Complex instance + */ + static create(properties?: Object): jspb.test.OuterMessage.Complex; + + /** + * Encodes the specified Complex. + * @function + * @param {jspb.test.OuterMessage.Complex|Object} message Complex or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.OuterMessage.Complex|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Complex, length delimited. + * @param {jspb.test.OuterMessage.Complex|Object} message Complex or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.OuterMessage.Complex|Object), writer?: Writer): Writer; + + /** + * Decodes a Complex from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.OuterMessage.Complex} Complex + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.OuterMessage.Complex; + + /** + * Decodes a Complex from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.OuterMessage.Complex} Complex + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.OuterMessage.Complex; + + /** + * Verifies a Complex. + * @function + * @param {jspb.test.OuterMessage.Complex|Object} message Complex or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.OuterMessage.Complex|Object)): string; + } + } + + /** + * Constructs a new IsExtension. + * @exports jspb.test.IsExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + class IsExtension { + + /** + * Constructs a new IsExtension. + * @exports jspb.test.IsExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * IsExtension ext1. + * @type {string} + */ + ext1: string; + + /** + * Creates a new IsExtension instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.IsExtension} IsExtension instance + */ + static create(properties?: Object): jspb.test.IsExtension; + + /** + * Encodes the specified IsExtension. + * @function + * @param {jspb.test.IsExtension|Object} message IsExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.IsExtension|Object), writer?: Writer): Writer; + + /** + * Encodes the specified IsExtension, length delimited. + * @param {jspb.test.IsExtension|Object} message IsExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.IsExtension|Object), writer?: Writer): Writer; + + /** + * Decodes a IsExtension from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.IsExtension} IsExtension + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.IsExtension; + + /** + * Decodes a IsExtension from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.IsExtension} IsExtension + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.IsExtension; + + /** + * Verifies a IsExtension. + * @function + * @param {jspb.test.IsExtension|Object} message IsExtension or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.IsExtension|Object)): string; + } + + /** + * Constructs a new IndirectExtension. + * @exports jspb.test.IndirectExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + class IndirectExtension { + + /** + * Constructs a new IndirectExtension. + * @exports jspb.test.IndirectExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new IndirectExtension instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.IndirectExtension} IndirectExtension instance + */ + static create(properties?: Object): jspb.test.IndirectExtension; + + /** + * Encodes the specified IndirectExtension. + * @function + * @param {jspb.test.IndirectExtension|Object} message IndirectExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.IndirectExtension|Object), writer?: Writer): Writer; + + /** + * Encodes the specified IndirectExtension, length delimited. + * @param {jspb.test.IndirectExtension|Object} message IndirectExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.IndirectExtension|Object), writer?: Writer): Writer; + + /** + * Decodes a IndirectExtension from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.IndirectExtension} IndirectExtension + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.IndirectExtension; + + /** + * Decodes a IndirectExtension from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.IndirectExtension} IndirectExtension + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.IndirectExtension; + + /** + * Verifies a IndirectExtension. + * @function + * @param {jspb.test.IndirectExtension|Object} message IndirectExtension or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.IndirectExtension|Object)): string; + } + + /** + * Constructs a new DefaultValues. + * @exports jspb.test.DefaultValues + * @constructor + * @param {Object} [properties] Properties to set + */ + class DefaultValues { + + /** + * Constructs a new DefaultValues. + * @exports jspb.test.DefaultValues + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * DefaultValues stringField. + * @type {string} + */ + stringField: string; + + /** + * DefaultValues boolField. + * @type {boolean} + */ + boolField: boolean; + + /** + * DefaultValues intField. + * @type {number|Long} + */ + intField: (number|Long); + + /** + * DefaultValues enumField. + * @type {number} + */ + enumField: number; + + /** + * DefaultValues emptyField. + * @type {string} + */ + emptyField: string; + + /** + * DefaultValues bytesField. + * @type {Uint8Array} + */ + bytesField: Uint8Array; + + /** + * Creates a new DefaultValues instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.DefaultValues} DefaultValues instance + */ + static create(properties?: Object): jspb.test.DefaultValues; + + /** + * Encodes the specified DefaultValues. + * @function + * @param {jspb.test.DefaultValues|Object} message DefaultValues or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.DefaultValues|Object), writer?: Writer): Writer; + + /** + * Encodes the specified DefaultValues, length delimited. + * @param {jspb.test.DefaultValues|Object} message DefaultValues or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.DefaultValues|Object), writer?: Writer): Writer; + + /** + * Decodes a DefaultValues from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.DefaultValues} DefaultValues + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.DefaultValues; + + /** + * Decodes a DefaultValues from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.DefaultValues} DefaultValues + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.DefaultValues; + + /** + * Verifies a DefaultValues. + * @function + * @param {jspb.test.DefaultValues|Object} message DefaultValues or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.DefaultValues|Object)): string; + } + + /** + * Constructs a new FloatingPointFields. + * @exports jspb.test.FloatingPointFields + * @constructor + * @param {Object} [properties] Properties to set + */ + class FloatingPointFields { + + /** + * Constructs a new FloatingPointFields. + * @exports jspb.test.FloatingPointFields + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FloatingPointFields optionalFloatField. + * @type {number} + */ + optionalFloatField: number; + + /** + * FloatingPointFields requiredFloatField. + * @type {number} + */ + requiredFloatField: number; + + /** + * FloatingPointFields repeatedFloatField. + * @type {Array.} + */ + repeatedFloatField: number[]; + + /** + * FloatingPointFields defaultFloatField. + * @type {number} + */ + defaultFloatField: number; + + /** + * FloatingPointFields optionalDoubleField. + * @type {number} + */ + optionalDoubleField: number; + + /** + * FloatingPointFields requiredDoubleField. + * @type {number} + */ + requiredDoubleField: number; + + /** + * FloatingPointFields repeatedDoubleField. + * @type {Array.} + */ + repeatedDoubleField: number[]; + + /** + * FloatingPointFields defaultDoubleField. + * @type {number} + */ + defaultDoubleField: number; + + /** + * Creates a new FloatingPointFields instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.FloatingPointFields} FloatingPointFields instance + */ + static create(properties?: Object): jspb.test.FloatingPointFields; + + /** + * Encodes the specified FloatingPointFields. + * @function + * @param {jspb.test.FloatingPointFields|Object} message FloatingPointFields or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.FloatingPointFields|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FloatingPointFields, length delimited. + * @param {jspb.test.FloatingPointFields|Object} message FloatingPointFields or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.FloatingPointFields|Object), writer?: Writer): Writer; + + /** + * Decodes a FloatingPointFields from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.FloatingPointFields} FloatingPointFields + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.FloatingPointFields; + + /** + * Decodes a FloatingPointFields from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.FloatingPointFields} FloatingPointFields + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.FloatingPointFields; + + /** + * Verifies a FloatingPointFields. + * @function + * @param {jspb.test.FloatingPointFields|Object} message FloatingPointFields or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.FloatingPointFields|Object)): string; + } + + /** + * Constructs a new TestClone. + * @exports jspb.test.TestClone + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestClone { + + /** + * Constructs a new TestClone. + * @exports jspb.test.TestClone + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestClone str. + * @type {string} + */ + str: string; + + /** + * TestClone simple1. + * @type {jspb.test.Simple1} + */ + simple1: jspb.test.Simple1; + + /** + * TestClone simple2. + * @type {Array.} + */ + simple2: jspb.test.Simple1[]; + + /** + * TestClone bytesField. + * @type {Uint8Array} + */ + bytesField: Uint8Array; + + /** + * TestClone unused. + * @type {string} + */ + unused: string; + + /** + * Creates a new TestClone instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestClone} TestClone instance + */ + static create(properties?: Object): jspb.test.TestClone; + + /** + * Encodes the specified TestClone. + * @function + * @param {jspb.test.TestClone|Object} message TestClone or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestClone|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestClone, length delimited. + * @param {jspb.test.TestClone|Object} message TestClone or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestClone|Object), writer?: Writer): Writer; + + /** + * Decodes a TestClone from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestClone} TestClone + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestClone; + + /** + * Decodes a TestClone from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestClone} TestClone + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestClone; + + /** + * Verifies a TestClone. + * @function + * @param {jspb.test.TestClone|Object} message TestClone or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestClone|Object)): string; + } + + /** + * Constructs a new CloneExtension. + * @exports jspb.test.CloneExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + class CloneExtension { + + /** + * Constructs a new CloneExtension. + * @exports jspb.test.CloneExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * CloneExtension ext. + * @type {string} + */ + ext: string; + + /** + * Creates a new CloneExtension instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.CloneExtension} CloneExtension instance + */ + static create(properties?: Object): jspb.test.CloneExtension; + + /** + * Encodes the specified CloneExtension. + * @function + * @param {jspb.test.CloneExtension|Object} message CloneExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.CloneExtension|Object), writer?: Writer): Writer; + + /** + * Encodes the specified CloneExtension, length delimited. + * @param {jspb.test.CloneExtension|Object} message CloneExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.CloneExtension|Object), writer?: Writer): Writer; + + /** + * Decodes a CloneExtension from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.CloneExtension} CloneExtension + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.CloneExtension; + + /** + * Decodes a CloneExtension from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.CloneExtension} CloneExtension + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.CloneExtension; + + /** + * Verifies a CloneExtension. + * @function + * @param {jspb.test.CloneExtension|Object} message CloneExtension or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.CloneExtension|Object)): string; + } + + /** + * Constructs a new TestGroup. + * @exports jspb.test.TestGroup + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestGroup { + + /** + * Constructs a new TestGroup. + * @exports jspb.test.TestGroup + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestGroup id. + * @type {string} + */ + id: string; + + /** + * TestGroup requiredSimple. + * @type {jspb.test.Simple2} + */ + requiredSimple: jspb.test.Simple2; + + /** + * TestGroup optionalSimple. + * @type {jspb.test.Simple2} + */ + optionalSimple: jspb.test.Simple2; + + /** + * Creates a new TestGroup instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestGroup} TestGroup instance + */ + static create(properties?: Object): jspb.test.TestGroup; + + /** + * Encodes the specified TestGroup. + * @function + * @param {jspb.test.TestGroup|Object} message TestGroup or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestGroup|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestGroup, length delimited. + * @param {jspb.test.TestGroup|Object} message TestGroup or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestGroup|Object), writer?: Writer): Writer; + + /** + * Decodes a TestGroup from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestGroup} TestGroup + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestGroup; + + /** + * Decodes a TestGroup from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestGroup} TestGroup + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestGroup; + + /** + * Verifies a TestGroup. + * @function + * @param {jspb.test.TestGroup|Object} message TestGroup or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestGroup|Object)): string; + } + + /** + * Constructs a new TestReservedNames. + * @exports jspb.test.TestReservedNames + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestReservedNames { + + /** + * Constructs a new TestReservedNames. + * @exports jspb.test.TestReservedNames + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestReservedNames extension. + * @type {number} + */ + extension: number; + + /** + * Creates a new TestReservedNames instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestReservedNames} TestReservedNames instance + */ + static create(properties?: Object): jspb.test.TestReservedNames; + + /** + * Encodes the specified TestReservedNames. + * @function + * @param {jspb.test.TestReservedNames|Object} message TestReservedNames or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestReservedNames|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestReservedNames, length delimited. + * @param {jspb.test.TestReservedNames|Object} message TestReservedNames or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestReservedNames|Object), writer?: Writer): Writer; + + /** + * Decodes a TestReservedNames from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestReservedNames} TestReservedNames + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestReservedNames; + + /** + * Decodes a TestReservedNames from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestReservedNames} TestReservedNames + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestReservedNames; + + /** + * Verifies a TestReservedNames. + * @function + * @param {jspb.test.TestReservedNames|Object} message TestReservedNames or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestReservedNames|Object)): string; + } + + /** + * Constructs a new TestReservedNamesExtension. + * @exports jspb.test.TestReservedNamesExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestReservedNamesExtension { + + /** + * Constructs a new TestReservedNamesExtension. + * @exports jspb.test.TestReservedNamesExtension + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new TestReservedNamesExtension instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestReservedNamesExtension} TestReservedNamesExtension instance + */ + static create(properties?: Object): jspb.test.TestReservedNamesExtension; + + /** + * Encodes the specified TestReservedNamesExtension. + * @function + * @param {jspb.test.TestReservedNamesExtension|Object} message TestReservedNamesExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestReservedNamesExtension|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestReservedNamesExtension, length delimited. + * @param {jspb.test.TestReservedNamesExtension|Object} message TestReservedNamesExtension or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestReservedNamesExtension|Object), writer?: Writer): Writer; + + /** + * Decodes a TestReservedNamesExtension from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestReservedNamesExtension} TestReservedNamesExtension + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestReservedNamesExtension; + + /** + * Decodes a TestReservedNamesExtension from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestReservedNamesExtension} TestReservedNamesExtension + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestReservedNamesExtension; + + /** + * Verifies a TestReservedNamesExtension. + * @function + * @param {jspb.test.TestReservedNamesExtension|Object} message TestReservedNamesExtension or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestReservedNamesExtension|Object)): string; + } + + /** + * Constructs a new TestMessageWithOneof. + * @exports jspb.test.TestMessageWithOneof + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestMessageWithOneof { + + /** + * Constructs a new TestMessageWithOneof. + * @exports jspb.test.TestMessageWithOneof + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestMessageWithOneof pone. + * @type {string} + */ + pone: string; + + /** + * TestMessageWithOneof pthree. + * @type {string} + */ + pthree: string; + + /** + * TestMessageWithOneof rone. + * @type {jspb.test.TestMessageWithOneof} + */ + rone: jspb.test.TestMessageWithOneof; + + /** + * TestMessageWithOneof rtwo. + * @type {string} + */ + rtwo: string; + + /** + * TestMessageWithOneof normalField. + * @type {boolean} + */ + normalField: boolean; + + /** + * TestMessageWithOneof repeatedField. + * @type {Array.} + */ + repeatedField: string[]; + + /** + * TestMessageWithOneof aone. + * @type {number} + */ + aone: number; + + /** + * TestMessageWithOneof atwo. + * @type {number} + */ + atwo: number; + + /** + * TestMessageWithOneof bone. + * @type {number} + */ + bone: number; + + /** + * TestMessageWithOneof btwo. + * @type {number} + */ + btwo: number; + + /** + * TestMessageWithOneof partialOneof. + * @name jspb.test.TestMessageWithOneof#partialOneof + * @type {string|undefined} + */ + partialOneof: (string|undefined); + + /** + * TestMessageWithOneof recursiveOneof. + * @name jspb.test.TestMessageWithOneof#recursiveOneof + * @type {string|undefined} + */ + recursiveOneof: (string|undefined); + + /** + * TestMessageWithOneof defaultOneofA. + * @name jspb.test.TestMessageWithOneof#defaultOneofA + * @type {string|undefined} + */ + defaultOneofA: (string|undefined); + + /** + * TestMessageWithOneof defaultOneofB. + * @name jspb.test.TestMessageWithOneof#defaultOneofB + * @type {string|undefined} + */ + defaultOneofB: (string|undefined); + + /** + * Creates a new TestMessageWithOneof instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestMessageWithOneof} TestMessageWithOneof instance + */ + static create(properties?: Object): jspb.test.TestMessageWithOneof; + + /** + * Encodes the specified TestMessageWithOneof. + * @function + * @param {jspb.test.TestMessageWithOneof|Object} message TestMessageWithOneof or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestMessageWithOneof|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestMessageWithOneof, length delimited. + * @param {jspb.test.TestMessageWithOneof|Object} message TestMessageWithOneof or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestMessageWithOneof|Object), writer?: Writer): Writer; + + /** + * Decodes a TestMessageWithOneof from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestMessageWithOneof} TestMessageWithOneof + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestMessageWithOneof; + + /** + * Decodes a TestMessageWithOneof from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestMessageWithOneof} TestMessageWithOneof + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestMessageWithOneof; + + /** + * Verifies a TestMessageWithOneof. + * @function + * @param {jspb.test.TestMessageWithOneof|Object} message TestMessageWithOneof or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestMessageWithOneof|Object)): string; + } + + /** + * Constructs a new TestEndsWithBytes. + * @exports jspb.test.TestEndsWithBytes + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestEndsWithBytes { + + /** + * Constructs a new TestEndsWithBytes. + * @exports jspb.test.TestEndsWithBytes + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestEndsWithBytes value. + * @type {number} + */ + value: number; + + /** + * TestEndsWithBytes data. + * @type {Uint8Array} + */ + data: Uint8Array; + + /** + * Creates a new TestEndsWithBytes instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestEndsWithBytes} TestEndsWithBytes instance + */ + static create(properties?: Object): jspb.test.TestEndsWithBytes; + + /** + * Encodes the specified TestEndsWithBytes. + * @function + * @param {jspb.test.TestEndsWithBytes|Object} message TestEndsWithBytes or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestEndsWithBytes|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestEndsWithBytes, length delimited. + * @param {jspb.test.TestEndsWithBytes|Object} message TestEndsWithBytes or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestEndsWithBytes|Object), writer?: Writer): Writer; + + /** + * Decodes a TestEndsWithBytes from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestEndsWithBytes} TestEndsWithBytes + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestEndsWithBytes; + + /** + * Decodes a TestEndsWithBytes from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestEndsWithBytes} TestEndsWithBytes + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestEndsWithBytes; + + /** + * Verifies a TestEndsWithBytes. + * @function + * @param {jspb.test.TestEndsWithBytes|Object} message TestEndsWithBytes or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestEndsWithBytes|Object)): string; + } + + /** + * Constructs a new TestMapFieldsNoBinary. + * @exports jspb.test.TestMapFieldsNoBinary + * @constructor + * @param {Object} [properties] Properties to set + */ + class TestMapFieldsNoBinary { + + /** + * Constructs a new TestMapFieldsNoBinary. + * @exports jspb.test.TestMapFieldsNoBinary + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * TestMapFieldsNoBinary mapStringString. + * @type {string} + */ + mapStringString: string; + + /** + * TestMapFieldsNoBinary mapStringInt32. + * @type {number} + */ + mapStringInt32: number; + + /** + * TestMapFieldsNoBinary mapStringInt64. + * @type {number|Long} + */ + mapStringInt64: (number|Long); + + /** + * TestMapFieldsNoBinary mapStringBool. + * @type {boolean} + */ + mapStringBool: boolean; + + /** + * TestMapFieldsNoBinary mapStringDouble. + * @type {number} + */ + mapStringDouble: number; + + /** + * TestMapFieldsNoBinary mapStringEnum. + * @type {number} + */ + mapStringEnum: number; + + /** + * TestMapFieldsNoBinary mapStringMsg. + * @type {jspb.test.MapValueMessageNoBinary} + */ + mapStringMsg: jspb.test.MapValueMessageNoBinary; + + /** + * TestMapFieldsNoBinary mapInt32String. + * @type {string} + */ + mapInt32String: string; + + /** + * TestMapFieldsNoBinary mapInt64String. + * @type {string} + */ + mapInt64String: string; + + /** + * TestMapFieldsNoBinary mapBoolString. + * @type {string} + */ + mapBoolString: string; + + /** + * TestMapFieldsNoBinary testMapFields. + * @type {jspb.test.TestMapFieldsNoBinary} + */ + testMapFields: jspb.test.TestMapFieldsNoBinary; + + /** + * TestMapFieldsNoBinary mapStringTestmapfields. + * @type {jspb.test.TestMapFieldsNoBinary} + */ + mapStringTestmapfields: jspb.test.TestMapFieldsNoBinary; + + /** + * Creates a new TestMapFieldsNoBinary instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.TestMapFieldsNoBinary} TestMapFieldsNoBinary instance + */ + static create(properties?: Object): jspb.test.TestMapFieldsNoBinary; + + /** + * Encodes the specified TestMapFieldsNoBinary. + * @function + * @param {jspb.test.TestMapFieldsNoBinary|Object} message TestMapFieldsNoBinary or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: Writer): Writer; + + /** + * Encodes the specified TestMapFieldsNoBinary, length delimited. + * @param {jspb.test.TestMapFieldsNoBinary|Object} message TestMapFieldsNoBinary or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: Writer): Writer; + + /** + * Decodes a TestMapFieldsNoBinary from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.TestMapFieldsNoBinary} TestMapFieldsNoBinary + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.TestMapFieldsNoBinary; + + /** + * Decodes a TestMapFieldsNoBinary from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.TestMapFieldsNoBinary} TestMapFieldsNoBinary + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.TestMapFieldsNoBinary; + + /** + * Verifies a TestMapFieldsNoBinary. + * @function + * @param {jspb.test.TestMapFieldsNoBinary|Object} message TestMapFieldsNoBinary or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.TestMapFieldsNoBinary|Object)): string; + } + + /** + * Constructs a new MapValueMessageNoBinary. + * @exports jspb.test.MapValueMessageNoBinary + * @constructor + * @param {Object} [properties] Properties to set + */ + class MapValueMessageNoBinary { + + /** + * Constructs a new MapValueMessageNoBinary. + * @exports jspb.test.MapValueMessageNoBinary + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * MapValueMessageNoBinary foo. + * @type {number} + */ + foo: number; + + /** + * Creates a new MapValueMessageNoBinary instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.MapValueMessageNoBinary} MapValueMessageNoBinary instance + */ + static create(properties?: Object): jspb.test.MapValueMessageNoBinary; + + /** + * Encodes the specified MapValueMessageNoBinary. + * @function + * @param {jspb.test.MapValueMessageNoBinary|Object} message MapValueMessageNoBinary or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: Writer): Writer; + + /** + * Encodes the specified MapValueMessageNoBinary, length delimited. + * @param {jspb.test.MapValueMessageNoBinary|Object} message MapValueMessageNoBinary or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: Writer): Writer; + + /** + * Decodes a MapValueMessageNoBinary from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.MapValueMessageNoBinary} MapValueMessageNoBinary + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.MapValueMessageNoBinary; + + /** + * Decodes a MapValueMessageNoBinary from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.MapValueMessageNoBinary} MapValueMessageNoBinary + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.MapValueMessageNoBinary; + + /** + * Verifies a MapValueMessageNoBinary. + * @function + * @param {jspb.test.MapValueMessageNoBinary|Object} message MapValueMessageNoBinary or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.MapValueMessageNoBinary|Object)): string; + } + + /** + * Constructs a new Deeply. + * @exports jspb.test.Deeply + * @constructor + * @param {Object} [properties] Properties to set + */ + class Deeply { + + /** + * Constructs a new Deeply. + * @exports jspb.test.Deeply + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new Deeply instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Deeply} Deeply instance + */ + static create(properties?: Object): jspb.test.Deeply; + + /** + * Encodes the specified Deeply. + * @function + * @param {jspb.test.Deeply|Object} message Deeply or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Deeply|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Deeply, length delimited. + * @param {jspb.test.Deeply|Object} message Deeply or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Deeply|Object), writer?: Writer): Writer; + + /** + * Decodes a Deeply from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Deeply} Deeply + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Deeply; + + /** + * Decodes a Deeply from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Deeply} Deeply + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Deeply; + + /** + * Verifies a Deeply. + * @function + * @param {jspb.test.Deeply|Object} message Deeply or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Deeply|Object)): string; + } + + + /** + * Constructs a new Deeply. + * @exports jspb.test.Deeply + * @constructor + * @param {Object} [properties] Properties to set + */ + module Deeply { + + /** + * Constructs a new Nested. + * @exports jspb.test.Deeply.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + class Nested { + + /** + * Constructs a new Nested. + * @exports jspb.test.Deeply.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Creates a new Nested instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Deeply.Nested} Nested instance + */ + static create(properties?: Object): jspb.test.Deeply.Nested; + + /** + * Encodes the specified Nested. + * @function + * @param {jspb.test.Deeply.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Deeply.Nested|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Nested, length delimited. + * @param {jspb.test.Deeply.Nested|Object} message Nested or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Deeply.Nested|Object), writer?: Writer): Writer; + + /** + * Decodes a Nested from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Deeply.Nested} Nested + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested; + + /** + * Decodes a Nested from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Deeply.Nested} Nested + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Deeply.Nested; + + /** + * Verifies a Nested. + * @function + * @param {jspb.test.Deeply.Nested|Object} message Nested or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Deeply.Nested|Object)): string; + } + + + /** + * Constructs a new Nested. + * @exports jspb.test.Deeply.Nested + * @constructor + * @param {Object} [properties] Properties to set + */ + module Nested { + + /** + * Constructs a new Message. + * @exports jspb.test.Deeply.Nested.Message + * @constructor + * @param {Object} [properties] Properties to set + */ + class Message { + + /** + * Constructs a new Message. + * @exports jspb.test.Deeply.Nested.Message + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Message count. + * @type {number} + */ + count: number; + + /** + * Creates a new Message instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {jspb.test.Deeply.Nested.Message} Message instance + */ + static create(properties?: Object): jspb.test.Deeply.Nested.Message; + + /** + * Encodes the specified Message. + * @function + * @param {jspb.test.Deeply.Nested.Message|Object} message Message or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (jspb.test.Deeply.Nested.Message|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Message, length delimited. + * @param {jspb.test.Deeply.Nested.Message|Object} message Message or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (jspb.test.Deeply.Nested.Message|Object), writer?: Writer): Writer; + + /** + * Decodes a Message from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {jspb.test.Deeply.Nested.Message} Message + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested.Message; + + /** + * Decodes a Message from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {jspb.test.Deeply.Nested.Message} Message + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): jspb.test.Deeply.Nested.Message; + + /** + * Verifies a Message. + * @function + * @param {jspb.test.Deeply.Nested.Message|Object} message Message or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (jspb.test.Deeply.Nested.Message|Object)): string; + } + } + } + } +} + +/** + * Namespace google. + * @exports google + * @namespace + */ +declare module google { + + /** + * Namespace protobuf. + * @exports google.protobuf + * @namespace + */ + module protobuf { + + /** + * Constructs a new FileDescriptorSet. + * @exports google.protobuf.FileDescriptorSet + * @constructor + * @param {Object} [properties] Properties to set + */ + class FileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @exports google.protobuf.FileDescriptorSet + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FileDescriptorSet file. + * @type {Array.} + */ + file: google.protobuf.FileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + static create(properties?: Object): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet. + * @function + * @param {google.protobuf.FileDescriptorSet|Object} message FileDescriptorSet or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.FileDescriptorSet|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FileDescriptorSet, length delimited. + * @param {google.protobuf.FileDescriptorSet|Object} message FileDescriptorSet or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.FileDescriptorSet|Object), writer?: Writer): Writer; + + /** + * Decodes a FileDescriptorSet from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet. + * @function + * @param {google.protobuf.FileDescriptorSet|Object} message FileDescriptorSet or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.FileDescriptorSet|Object)): string; + } + + /** + * Constructs a new FileDescriptorProto. + * @exports google.protobuf.FileDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class FileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @exports google.protobuf.FileDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FileDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * FileDescriptorProto package. + * @name google.protobuf.FileDescriptorProto#package + * @type {string} + */ + package: string; + + /** + * FileDescriptorProto dependency. + * @type {Array.} + */ + dependency: string[]; + + /** + * FileDescriptorProto publicDependency. + * @type {Array.} + */ + publicDependency: number[]; + + /** + * FileDescriptorProto weakDependency. + * @type {Array.} + */ + weakDependency: number[]; + + /** + * FileDescriptorProto messageType. + * @type {Array.} + */ + messageType: google.protobuf.DescriptorProto[]; + + /** + * FileDescriptorProto enumType. + * @type {Array.} + */ + enumType: google.protobuf.EnumDescriptorProto[]; + + /** + * FileDescriptorProto service. + * @type {Array.} + */ + service: google.protobuf.ServiceDescriptorProto[]; + + /** + * FileDescriptorProto extension. + * @type {Array.} + */ + extension: google.protobuf.FieldDescriptorProto[]; + + /** + * FileDescriptorProto options. + * @type {google.protobuf.FileOptions} + */ + options: google.protobuf.FileOptions; + + /** + * FileDescriptorProto sourceCodeInfo. + * @type {google.protobuf.SourceCodeInfo} + */ + sourceCodeInfo: google.protobuf.SourceCodeInfo; + + /** + * FileDescriptorProto syntax. + * @type {string} + */ + syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto. + * @function + * @param {google.protobuf.FileDescriptorProto|Object} message FileDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.FileDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FileDescriptorProto, length delimited. + * @param {google.protobuf.FileDescriptorProto|Object} message FileDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.FileDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a FileDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto. + * @function + * @param {google.protobuf.FileDescriptorProto|Object} message FileDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.FileDescriptorProto|Object)): string; + } + + /** + * Constructs a new DescriptorProto. + * @exports google.protobuf.DescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class DescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @exports google.protobuf.DescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * DescriptorProto name. + * @type {string} + */ + name: string; + + /** + * DescriptorProto field. + * @type {Array.} + */ + field: google.protobuf.FieldDescriptorProto[]; + + /** + * DescriptorProto extension. + * @type {Array.} + */ + extension: google.protobuf.FieldDescriptorProto[]; + + /** + * DescriptorProto nestedType. + * @type {Array.} + */ + nestedType: google.protobuf.DescriptorProto[]; + + /** + * DescriptorProto enumType. + * @type {Array.} + */ + enumType: google.protobuf.EnumDescriptorProto[]; + + /** + * DescriptorProto extensionRange. + * @type {Array.} + */ + extensionRange: google.protobuf.DescriptorProto.ExtensionRange[]; + + /** + * DescriptorProto oneofDecl. + * @type {Array.} + */ + oneofDecl: google.protobuf.OneofDescriptorProto[]; + + /** + * DescriptorProto options. + * @type {google.protobuf.MessageOptions} + */ + options: google.protobuf.MessageOptions; + + /** + * DescriptorProto reservedRange. + * @type {Array.} + */ + reservedRange: google.protobuf.DescriptorProto.ReservedRange[]; + + /** + * DescriptorProto reservedName. + * @type {Array.} + */ + reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + static create(properties?: Object): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto. + * @function + * @param {google.protobuf.DescriptorProto|Object} message DescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.DescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified DescriptorProto, length delimited. + * @param {google.protobuf.DescriptorProto|Object} message DescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.DescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a DescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto. + * @function + * @param {google.protobuf.DescriptorProto|Object} message DescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.DescriptorProto|Object)): string; + } + + + /** + * Constructs a new DescriptorProto. + * @exports google.protobuf.DescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + module DescriptorProto { + + /** + * Constructs a new ExtensionRange. + * @exports google.protobuf.DescriptorProto.ExtensionRange + * @constructor + * @param {Object} [properties] Properties to set + */ + class ExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @exports google.protobuf.DescriptorProto.ExtensionRange + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * ExtensionRange start. + * @type {number} + */ + start: number; + + /** + * ExtensionRange end. + * @type {number} + */ + end: number; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + static create(properties?: Object): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange. + * @function + * @param {google.protobuf.DescriptorProto.ExtensionRange|Object} message ExtensionRange or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: Writer): Writer; + + /** + * Encodes the specified ExtensionRange, length delimited. + * @param {google.protobuf.DescriptorProto.ExtensionRange|Object} message ExtensionRange or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: Writer): Writer; + + /** + * Decodes a ExtensionRange from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes a ExtensionRange from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies a ExtensionRange. + * @function + * @param {google.protobuf.DescriptorProto.ExtensionRange|Object} message ExtensionRange or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.DescriptorProto.ExtensionRange|Object)): string; + } + + /** + * Constructs a new ReservedRange. + * @exports google.protobuf.DescriptorProto.ReservedRange + * @constructor + * @param {Object} [properties] Properties to set + */ + class ReservedRange { + + /** + * Constructs a new ReservedRange. + * @exports google.protobuf.DescriptorProto.ReservedRange + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * ReservedRange start. + * @type {number} + */ + start: number; + + /** + * ReservedRange end. + * @type {number} + */ + end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + static create(properties?: Object): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange. + * @function + * @param {google.protobuf.DescriptorProto.ReservedRange|Object} message ReservedRange or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: Writer): Writer; + + /** + * Encodes the specified ReservedRange, length delimited. + * @param {google.protobuf.DescriptorProto.ReservedRange|Object} message ReservedRange or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: Writer): Writer; + + /** + * Decodes a ReservedRange from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange. + * @function + * @param {google.protobuf.DescriptorProto.ReservedRange|Object} message ReservedRange or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.DescriptorProto.ReservedRange|Object)): string; + } + } + + /** + * Constructs a new FieldDescriptorProto. + * @exports google.protobuf.FieldDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class FieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @exports google.protobuf.FieldDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FieldDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * FieldDescriptorProto number. + * @type {number} + */ + number: number; + + /** + * FieldDescriptorProto label. + * @type {number} + */ + label: number; + + /** + * FieldDescriptorProto type. + * @type {number} + */ + type: number; + + /** + * FieldDescriptorProto typeName. + * @type {string} + */ + typeName: string; + + /** + * FieldDescriptorProto extendee. + * @type {string} + */ + extendee: string; + + /** + * FieldDescriptorProto defaultValue. + * @type {string} + */ + defaultValue: string; + + /** + * FieldDescriptorProto oneofIndex. + * @type {number} + */ + oneofIndex: number; + + /** + * FieldDescriptorProto jsonName. + * @type {string} + */ + jsonName: string; + + /** + * FieldDescriptorProto options. + * @type {google.protobuf.FieldOptions} + */ + options: google.protobuf.FieldOptions; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto. + * @function + * @param {google.protobuf.FieldDescriptorProto|Object} message FieldDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.FieldDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FieldDescriptorProto, length delimited. + * @param {google.protobuf.FieldDescriptorProto|Object} message FieldDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.FieldDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a FieldDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto. + * @function + * @param {google.protobuf.FieldDescriptorProto|Object} message FieldDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.FieldDescriptorProto|Object)): string; + } + + /** + * Constructs a new OneofDescriptorProto. + * @exports google.protobuf.OneofDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class OneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @exports google.protobuf.OneofDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * OneofDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * OneofDescriptorProto options. + * @type {google.protobuf.OneofOptions} + */ + options: google.protobuf.OneofOptions; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto. + * @function + * @param {google.protobuf.OneofDescriptorProto|Object} message OneofDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.OneofDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified OneofDescriptorProto, length delimited. + * @param {google.protobuf.OneofDescriptorProto|Object} message OneofDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.OneofDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a OneofDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes a OneofDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies a OneofDescriptorProto. + * @function + * @param {google.protobuf.OneofDescriptorProto|Object} message OneofDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.OneofDescriptorProto|Object)): string; + } + + /** + * Constructs a new EnumDescriptorProto. + * @exports google.protobuf.EnumDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class EnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @exports google.protobuf.EnumDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * EnumDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * EnumDescriptorProto value. + * @type {Array.} + */ + value: google.protobuf.EnumValueDescriptorProto[]; + + /** + * EnumDescriptorProto options. + * @type {google.protobuf.EnumOptions} + */ + options: google.protobuf.EnumOptions; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto. + * @function + * @param {google.protobuf.EnumDescriptorProto|Object} message EnumDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.EnumDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified EnumDescriptorProto, length delimited. + * @param {google.protobuf.EnumDescriptorProto|Object} message EnumDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.EnumDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a EnumDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes a EnumDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies a EnumDescriptorProto. + * @function + * @param {google.protobuf.EnumDescriptorProto|Object} message EnumDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.EnumDescriptorProto|Object)): string; + } + + /** + * Constructs a new EnumValueDescriptorProto. + * @exports google.protobuf.EnumValueDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class EnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @exports google.protobuf.EnumValueDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * EnumValueDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * EnumValueDescriptorProto number. + * @type {number} + */ + number: number; + + /** + * EnumValueDescriptorProto options. + * @type {google.protobuf.EnumValueOptions} + */ + options: google.protobuf.EnumValueOptions; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto. + * @function + * @param {google.protobuf.EnumValueDescriptorProto|Object} message EnumValueDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified EnumValueDescriptorProto, length delimited. + * @param {google.protobuf.EnumValueDescriptorProto|Object} message EnumValueDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a EnumValueDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes a EnumValueDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies a EnumValueDescriptorProto. + * @function + * @param {google.protobuf.EnumValueDescriptorProto|Object} message EnumValueDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.EnumValueDescriptorProto|Object)): string; + } + + /** + * Constructs a new ServiceDescriptorProto. + * @exports google.protobuf.ServiceDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class ServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @exports google.protobuf.ServiceDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * ServiceDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * ServiceDescriptorProto method. + * @type {Array.} + */ + method: google.protobuf.MethodDescriptorProto[]; + + /** + * ServiceDescriptorProto options. + * @type {google.protobuf.ServiceOptions} + */ + options: google.protobuf.ServiceOptions; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto. + * @function + * @param {google.protobuf.ServiceDescriptorProto|Object} message ServiceDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified ServiceDescriptorProto, length delimited. + * @param {google.protobuf.ServiceDescriptorProto|Object} message ServiceDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a ServiceDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto. + * @function + * @param {google.protobuf.ServiceDescriptorProto|Object} message ServiceDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.ServiceDescriptorProto|Object)): string; + } + + /** + * Constructs a new MethodDescriptorProto. + * @exports google.protobuf.MethodDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + class MethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @exports google.protobuf.MethodDescriptorProto + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * MethodDescriptorProto name. + * @type {string} + */ + name: string; + + /** + * MethodDescriptorProto inputType. + * @type {string} + */ + inputType: string; + + /** + * MethodDescriptorProto outputType. + * @type {string} + */ + outputType: string; + + /** + * MethodDescriptorProto options. + * @type {google.protobuf.MethodOptions} + */ + options: google.protobuf.MethodOptions; + + /** + * MethodDescriptorProto clientStreaming. + * @type {boolean} + */ + clientStreaming: boolean; + + /** + * MethodDescriptorProto serverStreaming. + * @type {boolean} + */ + serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + static create(properties?: Object): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto. + * @function + * @param {google.protobuf.MethodDescriptorProto|Object} message MethodDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.MethodDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Encodes the specified MethodDescriptorProto, length delimited. + * @param {google.protobuf.MethodDescriptorProto|Object} message MethodDescriptorProto or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.MethodDescriptorProto|Object), writer?: Writer): Writer; + + /** + * Decodes a MethodDescriptorProto from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto. + * @function + * @param {google.protobuf.MethodDescriptorProto|Object} message MethodDescriptorProto or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.MethodDescriptorProto|Object)): string; + } + + /** + * Constructs a new FileOptions. + * @exports google.protobuf.FileOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class FileOptions { + + /** + * Constructs a new FileOptions. + * @exports google.protobuf.FileOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FileOptions javaPackage. + * @type {string} + */ + javaPackage: string; + + /** + * FileOptions javaOuterClassname. + * @type {string} + */ + javaOuterClassname: string; + + /** + * FileOptions javaMultipleFiles. + * @type {boolean} + */ + javaMultipleFiles: boolean; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @type {boolean} + */ + javaGenerateEqualsAndHash: boolean; + + /** + * FileOptions javaStringCheckUtf8. + * @type {boolean} + */ + javaStringCheckUtf8: boolean; + + /** + * FileOptions optimizeFor. + * @type {number} + */ + optimizeFor: number; + + /** + * FileOptions goPackage. + * @type {string} + */ + goPackage: string; + + /** + * FileOptions ccGenericServices. + * @type {boolean} + */ + ccGenericServices: boolean; + + /** + * FileOptions javaGenericServices. + * @type {boolean} + */ + javaGenericServices: boolean; + + /** + * FileOptions pyGenericServices. + * @type {boolean} + */ + pyGenericServices: boolean; + + /** + * FileOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * FileOptions ccEnableArenas. + * @type {boolean} + */ + ccEnableArenas: boolean; + + /** + * FileOptions objcClassPrefix. + * @type {string} + */ + objcClassPrefix: string; + + /** + * FileOptions csharpNamespace. + * @type {string} + */ + csharpNamespace: string; + + /** + * FileOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + static create(properties?: Object): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions. + * @function + * @param {google.protobuf.FileOptions|Object} message FileOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.FileOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FileOptions, length delimited. + * @param {google.protobuf.FileOptions|Object} message FileOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.FileOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a FileOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions. + * @function + * @param {google.protobuf.FileOptions|Object} message FileOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.FileOptions|Object)): string; + } + + /** + * Constructs a new MessageOptions. + * @exports google.protobuf.MessageOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class MessageOptions { + + /** + * Constructs a new MessageOptions. + * @exports google.protobuf.MessageOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * MessageOptions messageSetWireFormat. + * @type {boolean} + */ + messageSetWireFormat: boolean; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @type {boolean} + */ + noStandardDescriptorAccessor: boolean; + + /** + * MessageOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * MessageOptions mapEntry. + * @type {boolean} + */ + mapEntry: boolean; + + /** + * MessageOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + static create(properties?: Object): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions. + * @function + * @param {google.protobuf.MessageOptions|Object} message MessageOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.MessageOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified MessageOptions, length delimited. + * @param {google.protobuf.MessageOptions|Object} message MessageOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.MessageOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a MessageOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions. + * @function + * @param {google.protobuf.MessageOptions|Object} message MessageOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.MessageOptions|Object)): string; + } + + /** + * Constructs a new FieldOptions. + * @exports google.protobuf.FieldOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class FieldOptions { + + /** + * Constructs a new FieldOptions. + * @exports google.protobuf.FieldOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * FieldOptions ctype. + * @type {number} + */ + ctype: number; + + /** + * FieldOptions packed. + * @type {boolean} + */ + packed: boolean; + + /** + * FieldOptions jstype. + * @type {number} + */ + jstype: number; + + /** + * FieldOptions lazy. + * @type {boolean} + */ + lazy: boolean; + + /** + * FieldOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * FieldOptions weak. + * @type {boolean} + */ + weak: boolean; + + /** + * FieldOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + static create(properties?: Object): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions. + * @function + * @param {google.protobuf.FieldOptions|Object} message FieldOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.FieldOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified FieldOptions, length delimited. + * @param {google.protobuf.FieldOptions|Object} message FieldOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.FieldOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a FieldOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions. + * @function + * @param {google.protobuf.FieldOptions|Object} message FieldOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.FieldOptions|Object)): string; + } + + /** + * Constructs a new OneofOptions. + * @exports google.protobuf.OneofOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class OneofOptions { + + /** + * Constructs a new OneofOptions. + * @exports google.protobuf.OneofOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * OneofOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + static create(properties?: Object): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions. + * @function + * @param {google.protobuf.OneofOptions|Object} message OneofOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.OneofOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified OneofOptions, length delimited. + * @param {google.protobuf.OneofOptions|Object} message OneofOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.OneofOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a OneofOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes a OneofOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies a OneofOptions. + * @function + * @param {google.protobuf.OneofOptions|Object} message OneofOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.OneofOptions|Object)): string; + } + + /** + * Constructs a new EnumOptions. + * @exports google.protobuf.EnumOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class EnumOptions { + + /** + * Constructs a new EnumOptions. + * @exports google.protobuf.EnumOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * EnumOptions allowAlias. + * @type {boolean} + */ + allowAlias: boolean; + + /** + * EnumOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * EnumOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + static create(properties?: Object): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions. + * @function + * @param {google.protobuf.EnumOptions|Object} message EnumOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.EnumOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified EnumOptions, length delimited. + * @param {google.protobuf.EnumOptions|Object} message EnumOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.EnumOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a EnumOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes a EnumOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies a EnumOptions. + * @function + * @param {google.protobuf.EnumOptions|Object} message EnumOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.EnumOptions|Object)): string; + } + + /** + * Constructs a new EnumValueOptions. + * @exports google.protobuf.EnumValueOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class EnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @exports google.protobuf.EnumValueOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * EnumValueOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * EnumValueOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + static create(properties?: Object): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions. + * @function + * @param {google.protobuf.EnumValueOptions|Object} message EnumValueOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.EnumValueOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified EnumValueOptions, length delimited. + * @param {google.protobuf.EnumValueOptions|Object} message EnumValueOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.EnumValueOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a EnumValueOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes a EnumValueOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies a EnumValueOptions. + * @function + * @param {google.protobuf.EnumValueOptions|Object} message EnumValueOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.EnumValueOptions|Object)): string; + } + + /** + * Constructs a new ServiceOptions. + * @exports google.protobuf.ServiceOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class ServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @exports google.protobuf.ServiceOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * ServiceOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * ServiceOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + static create(properties?: Object): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions. + * @function + * @param {google.protobuf.ServiceOptions|Object} message ServiceOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.ServiceOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified ServiceOptions, length delimited. + * @param {google.protobuf.ServiceOptions|Object} message ServiceOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.ServiceOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a ServiceOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions. + * @function + * @param {google.protobuf.ServiceOptions|Object} message ServiceOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.ServiceOptions|Object)): string; + } + + /** + * Constructs a new MethodOptions. + * @exports google.protobuf.MethodOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + class MethodOptions { + + /** + * Constructs a new MethodOptions. + * @exports google.protobuf.MethodOptions + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * MethodOptions deprecated. + * @type {boolean} + */ + deprecated: boolean; + + /** + * MethodOptions idempotencyLevel. + * @type {number} + */ + idempotencyLevel: number; + + /** + * MethodOptions uninterpretedOption. + * @type {Array.} + */ + uninterpretedOption: google.protobuf.UninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + static create(properties?: Object): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions. + * @function + * @param {google.protobuf.MethodOptions|Object} message MethodOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.MethodOptions|Object), writer?: Writer): Writer; + + /** + * Encodes the specified MethodOptions, length delimited. + * @param {google.protobuf.MethodOptions|Object} message MethodOptions or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.MethodOptions|Object), writer?: Writer): Writer; + + /** + * Decodes a MethodOptions from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions. + * @function + * @param {google.protobuf.MethodOptions|Object} message MethodOptions or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.MethodOptions|Object)): string; + } + + /** + * Constructs a new UninterpretedOption. + * @exports google.protobuf.UninterpretedOption + * @constructor + * @param {Object} [properties] Properties to set + */ + class UninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @exports google.protobuf.UninterpretedOption + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * UninterpretedOption name. + * @type {Array.} + */ + name: google.protobuf.UninterpretedOption.NamePart[]; + + /** + * UninterpretedOption identifierValue. + * @type {string} + */ + identifierValue: string; + + /** + * UninterpretedOption positiveIntValue. + * @type {number|Long} + */ + positiveIntValue: (number|Long); + + /** + * UninterpretedOption negativeIntValue. + * @type {number|Long} + */ + negativeIntValue: (number|Long); + + /** + * UninterpretedOption doubleValue. + * @type {number} + */ + doubleValue: number; + + /** + * UninterpretedOption stringValue. + * @type {Uint8Array} + */ + stringValue: Uint8Array; + + /** + * UninterpretedOption aggregateValue. + * @type {string} + */ + aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + static create(properties?: Object): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption. + * @function + * @param {google.protobuf.UninterpretedOption|Object} message UninterpretedOption or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.UninterpretedOption|Object), writer?: Writer): Writer; + + /** + * Encodes the specified UninterpretedOption, length delimited. + * @param {google.protobuf.UninterpretedOption|Object} message UninterpretedOption or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.UninterpretedOption|Object), writer?: Writer): Writer; + + /** + * Decodes a UninterpretedOption from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes a UninterpretedOption from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies a UninterpretedOption. + * @function + * @param {google.protobuf.UninterpretedOption|Object} message UninterpretedOption or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.UninterpretedOption|Object)): string; + } + + + /** + * Constructs a new UninterpretedOption. + * @exports google.protobuf.UninterpretedOption + * @constructor + * @param {Object} [properties] Properties to set + */ + module UninterpretedOption { + + /** + * Constructs a new NamePart. + * @exports google.protobuf.UninterpretedOption.NamePart + * @constructor + * @param {Object} [properties] Properties to set + */ + class NamePart { + + /** + * Constructs a new NamePart. + * @exports google.protobuf.UninterpretedOption.NamePart + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * NamePart namePart. + * @type {string} + */ + namePart: string; + + /** + * NamePart isExtension. + * @type {boolean} + */ + isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + static create(properties?: Object): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart. + * @function + * @param {google.protobuf.UninterpretedOption.NamePart|Object} message NamePart or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: Writer): Writer; + + /** + * Encodes the specified NamePart, length delimited. + * @param {google.protobuf.UninterpretedOption.NamePart|Object} message NamePart or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: Writer): Writer; + + /** + * Decodes a NamePart from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart. + * @function + * @param {google.protobuf.UninterpretedOption.NamePart|Object} message NamePart or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.UninterpretedOption.NamePart|Object)): string; + } + } + + /** + * Constructs a new SourceCodeInfo. + * @exports google.protobuf.SourceCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + class SourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @exports google.protobuf.SourceCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * SourceCodeInfo location. + * @type {Array.} + */ + location: google.protobuf.SourceCodeInfo.Location[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + static create(properties?: Object): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo. + * @function + * @param {google.protobuf.SourceCodeInfo|Object} message SourceCodeInfo or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.SourceCodeInfo|Object), writer?: Writer): Writer; + + /** + * Encodes the specified SourceCodeInfo, length delimited. + * @param {google.protobuf.SourceCodeInfo|Object} message SourceCodeInfo or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.SourceCodeInfo|Object), writer?: Writer): Writer; + + /** + * Decodes a SourceCodeInfo from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo. + * @function + * @param {google.protobuf.SourceCodeInfo|Object} message SourceCodeInfo or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.SourceCodeInfo|Object)): string; + } + + + /** + * Constructs a new SourceCodeInfo. + * @exports google.protobuf.SourceCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + module SourceCodeInfo { + + /** + * Constructs a new Location. + * @exports google.protobuf.SourceCodeInfo.Location + * @constructor + * @param {Object} [properties] Properties to set + */ + class Location { + + /** + * Constructs a new Location. + * @exports google.protobuf.SourceCodeInfo.Location + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Location path. + * @type {Array.} + */ + path: number[]; + + /** + * Location span. + * @type {Array.} + */ + span: number[]; + + /** + * Location leadingComments. + * @type {string} + */ + leadingComments: string; + + /** + * Location trailingComments. + * @type {string} + */ + trailingComments: string; + + /** + * Location leadingDetachedComments. + * @type {Array.} + */ + leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + static create(properties?: Object): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location. + * @function + * @param {google.protobuf.SourceCodeInfo.Location|Object} message Location or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Location, length delimited. + * @param {google.protobuf.SourceCodeInfo.Location|Object} message Location or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: Writer): Writer; + + /** + * Decodes a Location from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location. + * @function + * @param {google.protobuf.SourceCodeInfo.Location|Object} message Location or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.SourceCodeInfo.Location|Object)): string; + } + } + + /** + * Constructs a new GeneratedCodeInfo. + * @exports google.protobuf.GeneratedCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + class GeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @exports google.protobuf.GeneratedCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * GeneratedCodeInfo annotation. + * @type {Array.} + */ + annotation: google.protobuf.GeneratedCodeInfo.Annotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + static create(properties?: Object): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo. + * @function + * @param {google.protobuf.GeneratedCodeInfo|Object} message GeneratedCodeInfo or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: Writer): Writer; + + /** + * Encodes the specified GeneratedCodeInfo, length delimited. + * @param {google.protobuf.GeneratedCodeInfo|Object} message GeneratedCodeInfo or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: Writer): Writer; + + /** + * Decodes a GeneratedCodeInfo from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo. + * @function + * @param {google.protobuf.GeneratedCodeInfo|Object} message GeneratedCodeInfo or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.GeneratedCodeInfo|Object)): string; + } + + + /** + * Constructs a new GeneratedCodeInfo. + * @exports google.protobuf.GeneratedCodeInfo + * @constructor + * @param {Object} [properties] Properties to set + */ + module GeneratedCodeInfo { + + /** + * Constructs a new Annotation. + * @exports google.protobuf.GeneratedCodeInfo.Annotation + * @constructor + * @param {Object} [properties] Properties to set + */ + class Annotation { + + /** + * Constructs a new Annotation. + * @exports google.protobuf.GeneratedCodeInfo.Annotation + * @constructor + * @param {Object} [properties] Properties to set + */ + constructor(properties?: Object); + + /** + * Annotation path. + * @type {Array.} + */ + path: number[]; + + /** + * Annotation sourceFile. + * @type {string} + */ + sourceFile: string; + + /** + * Annotation begin. + * @type {number} + */ + begin: number; + + /** + * Annotation end. + * @type {number} + */ + end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param {Object} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + static create(properties?: Object): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation. + * @function + * @param {google.protobuf.GeneratedCodeInfo.Annotation|Object} message Annotation or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encode(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: Writer): Writer; + + /** + * Encodes the specified Annotation, length delimited. + * @param {google.protobuf.GeneratedCodeInfo.Annotation|Object} message Annotation or plain object to encode + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} Writer + */ + static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: Writer): Writer; + + /** + * Decodes a Annotation from the specified reader or buffer. + * @function + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + static decode(readerOrBuffer: (Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes a Annotation from the specified reader or buffer, length delimited. + * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + static decodeDelimited(readerOrBuffer: (Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies a Annotation. + * @function + * @param {google.protobuf.GeneratedCodeInfo.Annotation|Object} message Annotation or plain object to verify + * @returns {?string} `null` if valid, otherwise the reason why it is not + */ + static verify(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object)): string; + } + } + } +} diff --git a/tests/data/test.js b/tests/data/test.js index 1cf6856d8..b6c2c0ccc 100644 --- a/tests/data/test.js +++ b/tests/data/test.js @@ -618,21 +618,21 @@ $root.jspb = (function() { /** * SpecialCases default. - * @name jspb.test.SpecialCases#default_ + * @name jspb.test.SpecialCases#default * @type {string} */ $prototype["default"] = ""; /** * SpecialCases function. - * @name jspb.test.SpecialCases#function_ + * @name jspb.test.SpecialCases#function * @type {string} */ $prototype["function"] = ""; /** * SpecialCases var. - * @name jspb.test.SpecialCases#var_ + * @name jspb.test.SpecialCases#var * @type {string} */ $prototype["var"] = ""; @@ -5066,7 +5066,7 @@ $root.google = (function() { /** * FileDescriptorProto package. - * @name google.protobuf.FileDescriptorProto#package_ + * @name google.protobuf.FileDescriptorProto#package * @type {string} */ $prototype["package"] = ""; diff --git a/tests/longbits.js b/tests/longbits.js new file mode 100644 index 000000000..fcfb80c49 --- /dev/null +++ b/tests/longbits.js @@ -0,0 +1,71 @@ +var tape = require("tape"); + +var protobuf = require(".."); +var LongBits = protobuf.util.LongBits; +var Long = protobuf.util.Long; + +tape.test("longbits", function(test) { + + test.test("zero", function(test) { + var zero = LongBits.zero; + test.equal(zero.lo, 0, "should have low bits of 0"); + test.equal(zero.hi, 0, "should have high bits of 0"); + test.equal(zero.toNumber(), 0, "should convert to number 0 (signed)"); + test.equal(zero.toNumber(true), 0, "should convert to number 0 (unsigned)"); + test.equal(zero.zzEncode(), zero, "should return itself when zig-zag encoded"); + test.equal(zero.length(), 1, "should return a byte length of 1"); + test.equal(LongBits.fromNumber(0), zero, "should be returned by fromNumber(0)"); + test.equal(LongBits.from(0), zero, "should be returned by from(0)"); + test.equal(LongBits.from(Long.ZERO), zero, "should be returned by from(Long.ZERO)"); + test.same(zero.toLong(), Long.ZERO, "should equal Long.ZERO (signed)"); + test.same(zero.toLong(true), Long.UZERO, "should equal Long.UZERO (unsigned)"); + test.equal(zero.toHash(), "\0\0\0\0\0\0\0\0", "should convert to a binary hash of 8x0"); + test.equal(LongBits.fromHash("\0\0\0\0\0\0\0\0"), zero, "should be returned for a binary hash of 8x0"); + test.end(); + }); + + [ + { low: 0, high: 0, unsigned: false, length: 1 }, + { low: 0, high: 0, unsigned: true, length: 1 }, + { low: (1 << 7) - 1, high: 0, unsigned: false, length: 1 }, + { low: (1 << 7) - 1, high: 0, unsigned: true, length: 1 }, + { low: (1 << 14) - 1, high: 0, unsigned: false, length: 2 }, + { low: (1 << 14) - 1, high: 0, unsigned: true, length: 2 }, + { low: (1 << 21) - 1, high: 0, unsigned: false, length: 3 }, + { low: (1 << 21) - 1, high: 0, unsigned: true, length: 3 }, + { low: (1 << 28) - 1, high: 0, unsigned: false, length: 4 }, + { low: (1 << 28) - 1, high: 0, unsigned: true, length: 4 }, + { low: -1, high: (1 << 3) - 1, unsigned: false, length: 5 }, + { low: -1, high: (1 << 3) - 1, unsigned: true, length: 5 }, + { low: -1, high: (1 << 10) - 1, unsigned: false, length: 6 }, + { low: -1, high: (1 << 10) - 1, unsigned: true, length: 6 }, + { low: -1, high: (1 << 17) - 1, unsigned: false, length: 7 }, + { low: -1, high: (1 << 17) - 1, unsigned: true, length: 7 }, + { low: -1, high: (1 << 24) - 1, unsigned: false, length: 8 }, + { low: -1, high: (1 << 24) - 1, unsigned: true, length: 8 }, + { low: -1, high: (1 << 31) - 1 | 0, unsigned: false, length: 9 }, + { low: -1, high: (1 << 31) - 1 | 0, unsigned: true, length: 9 }, + { low: -1, high: -1, unsigned: false, length: 10 }, + { low: -1, high: -1, unsigned: true, length: 10 }, + { low: 0, high: 1 << 31, unsigned: false, length: 10 }, + { low: 0, high: 1 << 31, unsigned: true, length: 10 } + ] + .forEach(function(value) { + var long = Long.fromValue(value); + test.equal(long.unsigned, value.unsigned, long + " should be signed/unsigned"); + var bits = LongBits.from(value); + test.equal(bits.lo, long.low >>> 0, long + " should have equal low bits"); + test.equal(bits.hi, long.high >>> 0, long + " should have equal high bits"); + test.equal(bits.length(), value.length, long + " should return an equal length"); + test.equal(bits.toNumber(value.unsigned), long.toNumber(), long + " should convert to an equal number"); + var number = long.toNumber(value.unsigned); + if (number <= 9007199254740991 && number >= -9007199254740991) + test.same(LongBits.fromNumber(number), bits, long + " should convert hence and forth equally (where safe)"); + test.same(bits.toLong(value.unsigned), long, long + " should convert to an equal Long"); + var comp = String.fromCharCode.apply(String, long.toBytesLE()); + test.equal(bits.toHash(), comp, long + " should convert to an equal hash"); + test.same(bits, LongBits.fromHash(comp), long + " should convert back to an equal value"); + }); + + test.end(); +}); \ No newline at end of file diff --git a/types/protobuf.js.d.ts b/types/protobuf.js.d.ts index c0b46eeab..bebdc0786 100644 --- a/types/protobuf.js.d.ts +++ b/types/protobuf.js.d.ts @@ -1,5 +1,5 @@ // $> pbts --name protobufjs --out types/protobuf.js.d.ts src -// Generated Sat, 24 Dec 2016 00:17:06 UTC +// Generated Thu, 29 Dec 2016 16:24:14 UTC declare module "protobufjs" { /** @@ -79,16 +79,16 @@ declare module "protobufjs" { * Provides common type definitions. * Can also be used to provide additional google types or your own custom types. * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition * @returns {undefined} - * @property {Object} google/protobuf/any.proto Any - * @property {Object} google/protobuf/duration.proto Duration - * @property {Object} google/protobuf/empty.proto Empty - * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {Object} google/protobuf/timestamp.proto Timestamp - * @property {Object} google/protobuf/wrappers.proto Wrappers + * @property {Object.} google/protobuf/any.proto Any + * @property {Object.} google/protobuf/duration.proto Duration + * @property {Object.} google/protobuf/empty.proto Empty + * @property {Object.} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {Object.} google/protobuf/timestamp.proto Timestamp + * @property {Object.} google/protobuf/wrappers.proto Wrappers */ - function common(name: string, json: Object): void; + function common(name: string, json: { [k: string]: any }): void; /** * A converter as used by {@link convert}. @@ -169,7 +169,7 @@ declare module "protobufjs" { * @constructor * @param {string} name Unique name within its namespace * @param {Object.} [values] Enum values as an object, by name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ class Enum extends ReflectionObject { @@ -180,9 +180,9 @@ declare module "protobufjs" { * @constructor * @param {string} name Unique name within its namespace * @param {Object.} [values] Enum values as an object, by name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ - constructor(name: string, values?: { [k: string]: number }, options?: Object); + constructor(name: string, values?: { [k: string]: number }, options?: { [k: string]: any }); /** * Enum values by name. @@ -250,9 +250,9 @@ declare module "protobufjs" { * @param {string} name Unique name within its namespace * @param {number} id Unique id within its namespace * @param {string} type Value type - * @param {string|Object} [rule="optional"] Field rule - * @param {string|Object} [extend] Extended type if different from parent - * @param {Object} [options] Declared options + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options */ class Field extends ReflectionObject { @@ -264,11 +264,11 @@ declare module "protobufjs" { * @param {string} name Unique name within its namespace * @param {number} id Unique id within its namespace * @param {string} type Value type - * @param {string|Object} [rule="optional"] Field rule - * @param {string|Object} [extend] Extended type if different from parent - * @param {Object} [options] Declared options + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options */ - constructor(name: string, id: number, type: string, rule?: (string|Object), extend?: (string|Object), options?: Object); + constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }); /** * Field rule, if any. @@ -392,11 +392,11 @@ declare module "protobufjs" { /** * Constructs a field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Field} Created field * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): Field; + static fromJSON(name: string, json: { [k: string]: any }): Field; /** * Resolves this field's type references. @@ -480,7 +480,7 @@ declare module "protobufjs" { * @param {number} id Unique id within its namespace * @param {string} keyType Key type * @param {string} type Value type - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ class MapField extends Field { @@ -493,9 +493,9 @@ declare module "protobufjs" { * @param {number} id Unique id within its namespace * @param {string} keyType Key type * @param {string} type Value type - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ - constructor(name: string, id: number, keyType: string, type: string, options?: Object); + constructor(name: string, id: number, keyType: string, type: string, options?: { [k: string]: any }); /** * Key type. @@ -511,33 +511,42 @@ declare module "protobufjs" { /** * Tests if the specified JSON object describes a map field. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a field */ - static testJSON(json: Object): boolean; + static testJSON(json: any): boolean; /** * Constructs a map field from JSON. * @param {string} name Field name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created map field * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): MapField; + static fromJSON(name: string, json: { [k: string]: any }): MapField; } /** * Constructs a new message instance. * - * This method should be called from your custom constructors, i.e. `Message.call(this, properties)`. + * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`. * @classdesc Abstract runtime message. - * @extends {Object} * @constructor * @param {Object.} [properties] Properties to set - * @abstract * @see {@link Class.create} */ - abstract class Message extends Object { + class Message { + + /** + * Constructs a new message instance. + * + * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`. + * @classdesc Abstract runtime message. + * @constructor + * @param {Object.} [properties] Properties to set + * @see {@link Class.create} + */ + constructor(properties?: { [k: string]: any }); /** * Reference to the reflected type. @@ -623,9 +632,9 @@ declare module "protobufjs" { * @param {string|undefined} type Method type, usually `"rpc"` * @param {string} requestType Request message type * @param {string} responseType Response message type - * @param {boolean|Object} [requestStream] Whether the request is streamed - * @param {boolean|Object} [responseStream] Whether the response is streamed - * @param {Object} [options] Declared options + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options */ class Method extends ReflectionObject { @@ -638,11 +647,11 @@ declare module "protobufjs" { * @param {string|undefined} type Method type, usually `"rpc"` * @param {string} requestType Request message type * @param {string} responseType Response message type - * @param {boolean|Object} [requestStream] Whether the request is streamed - * @param {boolean|Object} [responseStream] Whether the response is streamed - * @param {Object} [options] Declared options + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options */ - constructor(name: string, type: (string|undefined), requestType: string, responseType: string, requestStream?: (boolean|Object), responseStream?: (boolean|Object), options?: Object); + constructor(name: string, type: (string|undefined), requestType: string, responseType: string, requestStream?: (boolean|{ [k: string]: any }), responseStream?: (boolean|{ [k: string]: any }), options?: { [k: string]: any }); /** * Method type. @@ -688,19 +697,19 @@ declare module "protobufjs" { /** * Tests if the specified JSON object describes a service method. - * @param {Object} json JSON object + * @param {*} json JSON object * @returns {boolean} `true` if the object describes a map field */ - static testJSON(json: Object): boolean; + static testJSON(json: any): boolean; /** * Constructs a service method from JSON. * @param {string} name Method name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Method} Created method * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): Method; + static fromJSON(name: string, json: { [k: string]: any }): Method; } /** @@ -709,7 +718,7 @@ declare module "protobufjs" { * @extends ReflectionObject * @constructor * @param {string} name Namespace name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ class Namespace extends ReflectionObject { @@ -719,9 +728,9 @@ declare module "protobufjs" { * @extends ReflectionObject * @constructor * @param {string} name Namespace name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ - constructor(name: string, options?: Object); + constructor(name: string, options?: { [k: string]: any }); /** * Nested objects by name. @@ -747,11 +756,11 @@ declare module "protobufjs" { /** * Constructs a namespace from JSON. * @param {string} name Namespace name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Namespace} Created namespace * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): Namespace; + static fromJSON(name: string, json: { [k: string]: any }): Namespace; /** * Converts an array of reflection objects to JSON. @@ -869,7 +878,7 @@ declare module "protobufjs" { * @classdesc Base class of all reflection objects. * @constructor * @param {string} name Object name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options * @abstract */ abstract class ReflectionObject { @@ -916,10 +925,10 @@ declare module "protobufjs" { /** * Converts this reflection object to its JSON representation. - * @returns {Object} JSON object + * @returns {Object.} JSON object * @abstract */ - toJSON(): Object; + toJSON(): { [k: string]: any }; /** * Called when this object is added to a parent. @@ -979,7 +988,7 @@ declare module "protobufjs" { * @constructor * @param {string} name Oneof name * @param {string[]|Object} [fieldNames] Field names - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ class OneOf extends ReflectionObject { @@ -990,9 +999,9 @@ declare module "protobufjs" { * @constructor * @param {string} name Oneof name * @param {string[]|Object} [fieldNames] Field names - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ - constructor(name: string, fieldNames?: (string[]|Object), options?: Object); + constructor(name: string, fieldNames?: (string[]|Object), options?: { [k: string]: any }); /** * Upper cased name for getter/setter calls. @@ -1024,11 +1033,11 @@ declare module "protobufjs" { /** * Constructs a oneof from JSON. * @param {string} name Oneof name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {MapField} Created oneof * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): MapField; + static fromJSON(name: string, json: { [k: string]: any }): MapField; /** * Adds a field to this oneof. @@ -1048,30 +1057,22 @@ declare module "protobufjs" { /** * Result object returned from {@link parse}. * @typedef ParserResult - * @type {Object} + * @type {Object.} * @property {string|undefined} package Package name, if declared * @property {string[]|undefined} imports Imports, if any * @property {string[]|undefined} weakImports Weak imports, if any * @property {string|undefined} syntax Syntax, if specified (either `"proto2"` or `"proto3"`) * @property {Root} root Populated root instance */ - interface ParserResult { - package: (string|undefined); - imports: (string[]|undefined); - weakImports: (string[]|undefined); - syntax: (string|undefined); - root: Root; - } + type ParserResult = { [k: string]: any }; /** * Options modifying the behavior of {@link parse}. * @typedef ParseOptions - * @type {Object} + * @type {Object.} * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case */ - interface ParseOptions { - keepCase: boolean; - } + type ParseOptions = { [k: string]: any }; /** * Parses the given .proto source and returns an object with the parsed contents. @@ -1279,7 +1280,7 @@ declare module "protobufjs" { * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. * @extends Namespace * @constructor - * @param {Object} [options] Top level options + * @param {Object.} [options] Top level options */ class Root extends Namespace { @@ -1288,9 +1289,9 @@ declare module "protobufjs" { * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. * @extends Namespace * @constructor - * @param {Object} [options] Top level options + * @param {Object.} [options] Top level options */ - constructor(options?: Object); + constructor(options?: { [k: string]: any }); /** * Deferred extension fields. @@ -1306,11 +1307,11 @@ declare module "protobufjs" { /** * Loads a JSON definition into a root namespace. - * @param {*} json JSON definition + * @param {Object.|*} json JSON definition * @param {Root} [root] Root namespace, defaults to create a new one if omitted * @returns {Root} Root namespace */ - static fromJSON(json: any, root?: Root): Root; + static fromJSON(json: ({ [k: string]: any }|any), root?: Root): Root; /** * Resolves the path of an imported file, relative to the importing origin. @@ -1431,19 +1432,19 @@ declare module "protobufjs" { /** * Tests if the specified JSON object describes a service. - * @param {Object} json JSON object to test + * @param {*} json JSON object to test * @returns {boolean} `true` if the object describes a service */ - static testJSON(json: Object): boolean; + static testJSON(json: any): boolean; /** * Constructs a service from JSON. * @param {string} name Service name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: Object): Service; + static fromJSON(name: string, json: { [k: string]: any }): Service; /** * Creates a runtime service using the specified rpc implementation. @@ -1478,20 +1479,14 @@ declare module "protobufjs" { /** * Handle object returned from {@link tokenize}. - * @typedef {Object} TokenizerHandle + * @typedef {Object.} TokenizerHandle * @property {function():number} line Gets the current line number * @property {function():?string} next Gets the next token and advances (`null` on eof) * @property {function():?string} peek Peeks for the next token (`null` on eof) * @property {function(string)} push Pushes a token back to the stack * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws */ - interface TokenizerHandle { - line: () => any; - next: () => any; - peek: () => any; - push: () => any; - skip: () => any; - } + type TokenizerHandle = { [k: string]: any }; /** * Tokenizes the given .proto source and returns an object with useful utility functions. @@ -1506,7 +1501,7 @@ declare module "protobufjs" { * @extends Namespace * @constructor * @param {string} name Message name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ class Type extends Namespace { @@ -1516,9 +1511,9 @@ declare module "protobufjs" { * @extends Namespace * @constructor * @param {string} name Message name - * @param {Object} [options] Declared options + * @param {Object.} [options] Declared options */ - constructor(name: string, options?: Object); + constructor(name: string, options?: { [k: string]: any }); /** * Message fields. @@ -1593,10 +1588,10 @@ declare module "protobufjs" { /** * Creates a type from JSON. * @param {string} name Message name - * @param {Object} json JSON object + * @param {Object.} json JSON object * @returns {Type} Created message type */ - static fromJSON(name: string, json: Object): Type; + static fromJSON(name: string, json: { [k: string]: any }): Type; /** * Adds a nested object to this type. @@ -1618,18 +1613,18 @@ declare module "protobufjs" { /** * Creates a new message of this type using the specified properties. - * @param {Object} [properties] Properties to set + * @param {Object.} [properties] Properties to set * @returns {Message} Runtime message */ - create(properties?: Object): Message; + create(properties?: { [k: string]: any }): Message; /** * Creates a new message of this type from a JSON object by converting strings and numbers to their respective field types. - * @param {Object} object JSON object + * @param {Object.} object JSON object * @param {MessageConversionOptions} [options] Conversion options * @returns {Message} Runtime message */ - from(object: Object, options?: MessageConversionOptions): Message; + from(object: { [k: string]: any }, options?: MessageConversionOptions): Message; /** * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. @@ -1906,11 +1901,11 @@ declare module "protobufjs" { * Returns a promise from a node-style callback function. * @memberof util * @param {function(?Error, ...*)} fn Function to call - * @param {Object} ctx Function context + * @param {*} ctx Function context * @param {...*} params Function arguments * @returns {Promise<*>} Promisified function */ - function asPromise(fn: () => any, ctx: Object, params: any): Promise; + function asPromise(fn: () => any, ctx: any, params: any): Promise; /** * A minimal base64 implementation for number arrays. @@ -1978,10 +1973,10 @@ declare module "protobufjs" { * Registers an event listener. * @param {string} evt Event name * @param {function} fn Listener - * @param {Object} [ctx] Listener context + * @param {*} [ctx] Listener context * @returns {util.EventEmitter} `this` */ - on(evt: string, fn: () => any, ctx?: Object): util.EventEmitter; + on(evt: string, fn: () => any, ctx?: any): util.EventEmitter; /** * Removes an event listener or any matching listeners if arguments are omitted. @@ -2004,10 +1999,10 @@ declare module "protobufjs" { * Lets the specified constructor extend `this` class. * @memberof util * @param {*} ctor Extending constructor - * @returns {Object} Constructor prototype + * @returns {Object.} Constructor prototype * @this Function */ - function extend(this: Function, ctor: any): Object; + function extend(this: Function, ctor: any): { [k: string]: any }; /** * Fetches the contents of a file. @@ -2065,6 +2060,13 @@ declare module "protobufjs" { */ static zero: util.LongBits; + /** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ + static zeroHash: string; + /** * Constructs new long bits from the specified number. * @param {number} value Value @@ -2264,19 +2266,19 @@ declare module "protobufjs" { /** * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object - * @param {Object} descriptors Property descriptors + * @param {Object.} descriptors Property descriptors * @returns {undefined} */ - function props(target: Object, descriptors: Object): void; + function props(target: Object, descriptors: { [k: string]: any }): void; /** * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments. * @param {Object} target Target object * @param {string} key Property name - * @param {Object} descriptor Property descriptor + * @param {Object.} descriptor Property descriptor * @returns {undefined} */ - function prop(target: Object, key: string, descriptor: Object): void; + function prop(target: Object, key: string, descriptor: { [k: string]: any }): void; /** * An immuable empty array. @@ -2326,9 +2328,9 @@ declare module "protobufjs" { /** * Node's fs module if available. - * @type {Object} + * @type {Object.} */ - var fs: Object; + var fs: { [k: string]: any }; /** * Converts an object's values to an array. @@ -2339,12 +2341,12 @@ declare module "protobufjs" { /** * Merges the properties of the source object into the destination object. - * @param {Object} dst Destination object - * @param {Object} src Source object + * @param {Object.} dst Destination object + * @param {Object.} src Source object * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object} Destination object + * @returns {Object.} Destination object */ - function merge(dst: Object, src: Object, ifNotSet?: boolean): Object; + function merge(dst: { [k: string]: any }, src: { [k: string]: any }, ifNotSet?: boolean): { [k: string]: any }; /** * Returns a safe property accessor for the specified properly name. @@ -2565,10 +2567,9 @@ declare module "protobufjs" { /** * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @param {number} [id] Id with wire type 2 to prepend as a tag where applicable * @returns {Writer} `this` */ - ldelim(id?: number): Writer; + ldelim(): Writer; /** * Finishes the write operation. diff --git a/types/test.ts b/types/test.ts index e3812735f..d4a7f91ba 100644 --- a/types/test.ts +++ b/types/test.ts @@ -8,7 +8,7 @@ export const proto = {"nested":{"Hello":{"fields":{"value":{"rule":"required","t const root = protobuf.Root.fromJSON(proto); export class Hello extends protobuf.Message { - constructor (properties?: any) { + constructor (properties?: { [k: string]: any }) { super(properties); }