diff --git a/README.md b/README.md index bcc8b871e..9dcdcb22b 100644 --- a/README.md +++ b/README.md @@ -361,7 +361,10 @@ Consolidates imports and converts between file formats. --no-encode Does not generate encode functions. --no-decode Does not generate decode functions. --no-verify Does not generate verify functions. + --no-convert Does not generate convert functions like asJSON and from. --no-delimited Does not generate delimited encode/decode functions. + --no-beautify Does not beautify generated code. + --no-comments Does not output any JSDoc comments. usage: pbjs [options] file1.proto file2.json ... ``` diff --git a/cli/targets/static.js b/cli/targets/static.js index 5de41d580..98225c0da 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -166,8 +166,7 @@ function beautify(code) { mangle: false, output: { beautify: true, - bracketize: true, - screw_ie8: false + bracketize: true } } ).code.replace(/ {4}/g, "\t"); diff --git a/dist/noparse/protobuf.js b/dist/noparse/protobuf.js index 51d4b2f8f..7a492c19e 100644 --- a/dist/noparse/protobuf.js +++ b/dist/noparse/protobuf.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -48,128 +48,6 @@ function asPromise(fn, ctx/*, varargs */) { },{}],2:[function(require,module,exports){ "use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - string[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - string[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - string[i++] = b64[t | b >> 6]; - string[i++] = b64[b & 63]; - j = 0; - break; - } - } - if (j) { - string[i++] = b64[t]; - string[i ] = 61; - if (j === 1) - string[i + 1] = 61; - } - return String.fromCharCode.apply(String, string); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -},{}],3:[function(require,module,exports){ -"use strict"; module.exports = EventEmitter; /** @@ -249,7 +127,7 @@ EventEmitterPrototype.emit = function emit(evt) { return this; }; -},{}],4:[function(require,module,exports){ +},{}],3:[function(require,module,exports){ "use strict"; module.exports = extend; @@ -271,12 +149,12 @@ function extend(ctor) { return prototype; } -},{}],5:[function(require,module,exports){ +},{}],4:[function(require,module,exports){ "use strict"; module.exports = fetch; var asPromise = require(1), - inquire = require(6); + inquire = require(5); var fs = inquire("fs"); @@ -324,7 +202,7 @@ function fetch_xhr(path, callback) { xhr.send(); } -},{"1":1,"6":6}],6:[function(require,module,exports){ +},{"1":1,"5":5}],5:[function(require,module,exports){ "use strict"; module.exports = inquire; @@ -343,7 +221,7 @@ function inquire(moduleName) { return null; } -},{}],7:[function(require,module,exports){ +},{}],6:[function(require,module,exports){ "use strict"; /** @@ -410,7 +288,7 @@ path.resolve = function resolve(originPath, includePath, alreadyNormalized) { return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; }; -},{}],8:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ "use strict"; module.exports = pool; @@ -460,7 +338,7 @@ function pool(alloc, slice, size) { }; } -},{}],9:[function(require,module,exports){ +},{}],8:[function(require,module,exports){ "use strict"; /** @@ -567,17 +445,15 @@ utf8.write = function(string, buffer, offset) { return offset - start; }; -},{}],10:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ "use strict"; module.exports = Class; -var Message = require(18), - util = require(31); +var Message = require(17), + util = require(30); var Type; // cyclic -var TypeError = util._TypeError; - /** * Constructs a class instance, which is also a message prototype. * @classdesc Runtime class providing the tools to create your own custom classes. @@ -597,16 +473,16 @@ function Class(type) { */ function create(type, ctor) { if (!Type) - Type = require(29); + Type = require(28); /* istanbul ignore next */ if (!(type instanceof Type)) - throw TypeError("type", "a Type"); + throw TypeError("type must be a Type"); if (ctor) { /* istanbul ignore next */ if (typeof ctor !== "function") - throw TypeError("ctor", "a function"); + throw TypeError("ctor must be a function"); } else ctor = (function(MessageCtor) { return function Message(properties) { @@ -711,13 +587,13 @@ Class.prototype = Message; * @returns {?string} `null` if valid, otherwise the reason why it is not */ -},{"18":18,"29":29,"31":31}],11:[function(require,module,exports){ +},{"17":17,"28":28,"30":30}],10:[function(require,module,exports){ "use strict"; module.exports = converter; -var Enum = require(15), - converters = require(12), - util = require(31); +var Enum = require(14), + converters = require(11), + util = require(30); var sprintf = util.codegen.sprintf; @@ -734,7 +610,7 @@ function genConvert(field, fieldIndex, prop) { case "sfixed64": return sprintf("f.longs(s%s,%d,%d,%j,o)", prop, 0, 0, field.type.charAt(0) === "u"); case "bytes": - return sprintf("f.bytes(s%s,%j,o)", prop, field.defaultValue); + return sprintf("f.bytes(s%s,%j,o)", prop, Array.prototype.slice.call(field.defaultValue)); } return null; } @@ -838,7 +714,7 @@ util.merge(converter, converters); * @returns {string|number[]|Uint8Array} Converted value */ -},{"12":12,"15":15,"31":31}],12:[function(require,module,exports){ +},{"11":11,"14":14,"30":30}],11:[function(require,module,exports){ "use strict"; var converters = exports; @@ -971,13 +847,13 @@ converters.message = { } }; -},{"34":34}],13:[function(require,module,exports){ +},{"34":34}],12:[function(require,module,exports){ "use strict"; module.exports = decoder; -var Enum = require(15), - types = require(30), - util = require(31); +var Enum = require(14), + types = require(29), + util = require(30); /** * Generates a decoder specific to the specified message type. @@ -1064,13 +940,13 @@ function decoder(mtype) { /* eslint-enable no-unexpected-multiline */ } -},{"15":15,"30":30,"31":31}],14:[function(require,module,exports){ +},{"14":14,"29":29,"30":30}],13:[function(require,module,exports){ "use strict"; module.exports = encoder; -var Enum = require(15), - types = require(30), - util = require(31); +var Enum = require(14), + types = require(29), + util = require(30); function genEncodeType(gen, field, fieldIndex, ref) { return field.resolvedType.group @@ -1144,10 +1020,11 @@ function encoder(mtype) { } else if (!field.partOf) { if (!field.required) { - if (field.long) { - gen + if (field.long) gen ("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))", ref, ref, ref, field.defaultValue.low, field.defaultValue.high); - } else gen + else if (field.bytes) gen + ("if(%s&&%s.length" + (field.defaultValue.length ? "&&util.arrayNe(%s,%j)" : "") + ")", ref, ref, ref, Array.prototype.slice.call(field.defaultValue)); + else gen ("if(%s!==undefined&&%s!==%j)", ref, ref, field.defaultValue); } @@ -1188,19 +1065,17 @@ function encoder(mtype) { ("return w"); /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ } -},{"15":15,"30":30,"31":31}],15:[function(require,module,exports){ +},{"14":14,"29":29,"30":30}],14:[function(require,module,exports){ "use strict"; module.exports = Enum; -var ReflectionObject = require(21); +var ReflectionObject = require(20); /** @alias Enum.prototype */ var EnumPrototype = ReflectionObject.extend(Enum); Enum.className = "Enum"; -var util = require(31); - -var TypeError = util._TypeError; +var util = require(30); /** * Constructs a new enum instance. @@ -1285,10 +1160,10 @@ EnumPrototype.add = function(name, id) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (this.values[name] !== undefined) throw Error("duplicate name '" + name + "' in " + this); @@ -1309,7 +1184,7 @@ EnumPrototype.add = function(name, id) { */ EnumPrototype.remove = function(name) { if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); var val = this.values[name]; if (val === undefined) throw Error("'" + name + "' is not a name of " + this); @@ -1318,25 +1193,23 @@ EnumPrototype.remove = function(name) { return this; }; -},{"21":21,"31":31}],16:[function(require,module,exports){ +},{"20":20,"30":30}],15:[function(require,module,exports){ "use strict"; module.exports = Field; -var ReflectionObject = require(21); +var ReflectionObject = require(20); /** @alias Field.prototype */ var FieldPrototype = ReflectionObject.extend(Field); Field.className = "Field"; -var Enum = require(15), - types = require(30), - util = require(31); +var Enum = require(14), + types = require(29), + util = require(30); var Type, // cyclic MapField; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. * @classdesc Reflected message field. @@ -1361,16 +1234,16 @@ function Field(name, id, type, rule, extend, options) { /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (!util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend"); + throw TypeError("extend must be a string"); /* istanbul ignore next */ if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule", "a valid rule string"); + throw TypeError("rule must be a string rule"); /** * Field rule, if any. @@ -1522,7 +1395,7 @@ Field.testJSON = function testJSON(json) { Field.fromJSON = function fromJSON(name, json) { if (json.keyType !== undefined) { if (!MapField) - MapField = require(17); + MapField = require(16); return MapField.fromJSON(name, json); } return new Field(name, json.id, json.type, json.rule, json.extend, json.options); @@ -1555,7 +1428,7 @@ FieldPrototype.resolve = function resolve() { // if not a basic type, resolve it if (typeDefault === undefined) { if (!Type) - Type = require(29); + Type = require(28); if (this.resolvedType = this.parent.lookup(this.type, Type)) typeDefault = null; else if (this.resolvedType = this.parent.lookup(this.type, Enum)) @@ -1582,17 +1455,24 @@ FieldPrototype.resolve = function resolve() { this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === "u"); if (Object.freeze) Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + } else if (this.bytes && typeof this.defaultValue === "string") { + var buf; + if (util.base64.test(this.defaultValue)) + util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0); + else + util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0); + this.defaultValue = buf; } } return ReflectionObject.prototype.resolve.call(this); }; -},{"15":15,"17":17,"21":21,"29":29,"30":30,"31":31}],17:[function(require,module,exports){ +},{"14":14,"16":16,"20":20,"28":28,"29":29,"30":30}],16:[function(require,module,exports){ "use strict"; module.exports = MapField; -var Field = require(16); +var Field = require(15); /** @alias Field.prototype */ var FieldPrototype = Field.prototype; /** @alias MapField.prototype */ @@ -1600,8 +1480,8 @@ var MapFieldPrototype = Field.extend(MapField); MapField.className = "MapField"; -var types = require(30), - util = require(31); +var types = require(29), + util = require(30); /** * Constructs a new map field instance. @@ -1619,7 +1499,7 @@ function MapField(name, id, keyType, type, options) { /* istanbul ignore next */ if (!util.isString(keyType)) - throw util._TypeError("keyType"); + throw TypeError("keyType must be a string"); /** * Key type. @@ -1684,11 +1564,11 @@ MapFieldPrototype.resolve = function resolve() { return FieldPrototype.resolve.call(this); }; -},{"16":16,"30":30,"31":31}],18:[function(require,module,exports){ +},{"15":15,"29":29,"30":30}],17:[function(require,module,exports){ "use strict"; module.exports = Message; -var converters = require(12); +var converters = require(11); /** * Constructs a new message instance. @@ -1807,20 +1687,18 @@ Message.convert = function convert(source, impl, options) { return this.$type.convert(source, impl, options); }; -},{"12":12}],19:[function(require,module,exports){ +},{"11":11}],18:[function(require,module,exports){ "use strict"; module.exports = Method; -var ReflectionObject = require(21); +var ReflectionObject = require(20); /** @alias Method.prototype */ var MethodPrototype = ReflectionObject.extend(Method); Method.className = "Method"; -var Type = require(29), - util = require(31); - -var TypeError = util._TypeError; +var Type = require(28), + util = require(30); /** * Constructs a new service method instance. @@ -1848,13 +1726,13 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /* istanbul ignore next */ if (type && !util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (!util.isString(requestType)) - throw TypeError("requestType"); + throw TypeError("requestType must be a string"); /* istanbul ignore next */ if (!util.isString(responseType)) - throw TypeError("responseType"); + throw TypeError("responseType must be a string"); ReflectionObject.call(this, name, options); @@ -1952,19 +1830,19 @@ MethodPrototype.resolve = function resolve() { return ReflectionObject.prototype.resolve.call(this); }; -},{"21":21,"29":29,"31":31}],20:[function(require,module,exports){ +},{"20":20,"28":28,"30":30}],19:[function(require,module,exports){ "use strict"; module.exports = Namespace; -var ReflectionObject = require(21); +var ReflectionObject = require(20); /** @alias Namespace.prototype */ var NamespacePrototype = ReflectionObject.extend(Namespace); Namespace.className = "Namespace"; -var Enum = require(15), - Field = require(16), - util = require(31); +var Enum = require(14), + Field = require(15), + util = require(30); var Type, // cyclic Service; // cyclic @@ -1976,17 +1854,15 @@ function initNested() { /* istanbul ignore next */ if (!Type) - Type = require(29); + Type = require(28); /* istanbul ignore next */ if (!Service) - Service = require(28); + Service = require(27); nestedTypes = [ Enum, Type, Service, Field, Namespace ]; nestedError = "one of " + nestedTypes.map(function(ctor) { return ctor.name; }).join(", "); } -var TypeError = util._TypeError; - /** * Constructs a new namespace instance. * @classdesc Reflected namespace and base class of all reflection objects containing nested objects. @@ -2112,7 +1988,7 @@ NamespacePrototype.addJSON = function addJSON(nestedJson) { for (var j = 0; j < nestedTypes.length; ++j) if (nestedTypes[j].testJSON(nested)) return ns.add(nestedTypes[j].fromJSON(nestedName, nested)); - throw TypeError("nested." + nestedName, "JSON for " + nestedError); + throw TypeError("nested." + nestedName + " must be JSON for " + nestedError); }); } return this; @@ -2155,10 +2031,10 @@ NamespacePrototype.add = function add(object) { /* istanbul ignore next */ if (!object || nestedTypes.indexOf(object.constructor) < 0) - throw TypeError("object", nestedError); + throw TypeError("object must be " + nestedError); /* istanbul ignore next */ if (object instanceof Field && object.extend === undefined) - throw TypeError("object", "an extension field when not part of a type"); + throw TypeError("object must be an extension field when not part of a type"); if (!this.nested) this.nested = {}; @@ -2197,7 +2073,7 @@ NamespacePrototype.remove = function remove(object) { /* istanbul ignore next */ if (!(object instanceof ReflectionObject)) - throw TypeError("object", "a ReflectionObject"); + throw TypeError("object must be a ReflectionObject"); /* istanbul ignore next */ if (object.parent !== this || !this.nested) throw Error(object + " is not a member of " + this); @@ -2244,10 +2120,10 @@ NamespacePrototype.define = function define(path, json) { NamespacePrototype.resolve = function resolve() { /* istanbul ignore next */ if (!Type) - Type = require(29); + Type = require(28); /* istanbul ignore next */ if (!Service) - Type = require(28); + Type = require(27); // Add uppercased (and thus conflict-free) nested types, services and enums as properties // of the type just like static code does. This allows using a .d.ts generated for a static @@ -2332,7 +2208,7 @@ NamespacePrototype.lookupType = function lookupType(path) { /* istanbul ignore next */ if (!Type) - Type = require(29); + Type = require(28); var found = this.lookup(path, Type); if (!found) @@ -2351,7 +2227,7 @@ NamespacePrototype.lookupService = function lookupService(path) { /* istanbul ignore next */ if (!Service) - Service = require(28); + Service = require(27); var found = this.lookup(path, Service); if (!found) @@ -2373,19 +2249,17 @@ NamespacePrototype.lookupEnum = function lookupEnum(path) { return found.values; }; -},{"15":15,"16":16,"21":21,"28":28,"29":29,"31":31}],21:[function(require,module,exports){ +},{"14":14,"15":15,"20":20,"27":27,"28":28,"30":30}],20:[function(require,module,exports){ "use strict"; module.exports = ReflectionObject; -var util = require(31); +var util = require(30); ReflectionObject.className = "ReflectionObject"; ReflectionObject.extend = util.extend; var Root; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new reflection object instance. * @classdesc Base class of all reflection objects. @@ -2398,10 +2272,10 @@ function ReflectionObject(name, options) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (options && !util.isObject(options)) - throw TypeError("options", "an object"); + throw TypeError("options must be an object"); /** * Options. @@ -2488,7 +2362,7 @@ ReflectionObjectPrototype.onAdd = function onAdd(parent) { this.resolved = false; var root = parent.root; if (!Root) - Root = require(25); + Root = require(24); if (root instanceof Root) root._handleAdd(this); }; @@ -2501,7 +2375,7 @@ ReflectionObjectPrototype.onAdd = function onAdd(parent) { ReflectionObjectPrototype.onRemove = function onRemove(parent) { var root = parent.root; if (!Root) - Root = require(25); + Root = require(24); if (root instanceof Root) root._handleRemove(this); this.parent = null; @@ -2516,7 +2390,7 @@ ReflectionObjectPrototype.resolve = function resolve() { if (this.resolved) return this; if (!Root) - Root = require(25); + Root = require(24); if (this.root instanceof Root) this.resolved = true; // only if part of a root return this; @@ -2572,20 +2446,17 @@ ReflectionObjectPrototype.toString = function toString() { return className; }; -},{"25":25,"31":31}],22:[function(require,module,exports){ +},{"24":24,"30":30}],21:[function(require,module,exports){ "use strict"; module.exports = OneOf; -var ReflectionObject = require(21); +var ReflectionObject = require(20); /** @alias OneOf.prototype */ var OneOfPrototype = ReflectionObject.extend(OneOf); OneOf.className = "OneOf"; -var Field = require(16), - util = require(31); - -var TypeError = util._TypeError; +var Field = require(15); /** * Constructs a new oneof instance. @@ -2605,13 +2476,7 @@ function OneOf(name, fieldNames, options) { /* istanbul ignore next */ if (fieldNames && !Array.isArray(fieldNames)) - throw TypeError("fieldNames", "an Array"); - - /** - * Upper cased name for getter/setter calls. - * @type {string} - */ - this.ucName = util.ucFirst(this.name); + throw TypeError("fieldNames must be an Array"); /** * Field names that belong to this oneof. @@ -2694,7 +2559,7 @@ OneOfPrototype.add = function add(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); if (field.parent) field.parent.remove(field); @@ -2714,7 +2579,7 @@ OneOfPrototype.remove = function remove(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); var index = this._fieldsArray.indexOf(field); /* istanbul ignore next */ @@ -2760,7 +2625,7 @@ OneOfPrototype.onRemove = function onRemove(parent) { ReflectionObject.prototype.onRemove.call(this, parent); }; -},{"16":16,"21":21,"31":31}],23:[function(require,module,exports){ +},{"15":15,"20":20}],22:[function(require,module,exports){ "use strict"; module.exports = Reader; @@ -2812,9 +2677,11 @@ function Reader(buffer) { Reader.create = util.Buffer ? function create_buffer_setup(buffer) { if (!BufferReader) - BufferReader = require(24); + BufferReader = require(23); return (Reader.create = function create_buffer(buffer) { - return new BufferReader(buffer); + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + : new Reader(buffer); })(buffer); } /* istanbul ignore next */ @@ -3276,11 +3143,11 @@ Reader._configure = configure; configure(); -},{"24":24,"34":34}],24:[function(require,module,exports){ +},{"23":23,"34":34}],23:[function(require,module,exports){ "use strict"; module.exports = BufferReader; -var Reader = require(23); +var Reader = require(22); /** @alias BufferReader.prototype */ var BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype); BufferReaderPrototype.constructor = BufferReader; @@ -3309,18 +3176,18 @@ BufferReaderPrototype.string = function read_string_buffer() { return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)); }; -},{"23":23,"34":34}],25:[function(require,module,exports){ +},{"22":22,"34":34}],24:[function(require,module,exports){ "use strict"; module.exports = Root; -var Namespace = require(20); +var Namespace = require(19); /** @alias Root.prototype */ var RootPrototype = Namespace.extend(Root); Root.className = "Root"; -var Field = require(16), - util = require(31); +var Field = require(15), + util = require(30); var parse, // cyclic, might be excluded common; // might be excluded @@ -3627,7 +3494,7 @@ RootPrototype._handleRemove = function handleRemove(object) { } }; -},{"16":16,"20":20,"31":31,"undefined":undefined}],26:[function(require,module,exports){ +},{"15":15,"19":19,"30":30,"undefined":undefined}],25:[function(require,module,exports){ "use strict"; /** @@ -3636,13 +3503,13 @@ RootPrototype._handleRemove = function handleRemove(object) { */ var rpc = exports; -rpc.Service = require(27); +rpc.Service = require(26); -},{"27":27}],27:[function(require,module,exports){ +},{"26":26}],26:[function(require,module,exports){ "use strict"; module.exports = Service; -var util = require(31); +var util = require(30); var EventEmitter = util.EventEmitter; /** @@ -3682,11 +3549,11 @@ ServicePrototype.end = function end(endedByRPC) { return this; }; -},{"31":31}],28:[function(require,module,exports){ +},{"30":30}],27:[function(require,module,exports){ "use strict"; module.exports = Service; -var Namespace = require(20); +var Namespace = require(19); /** @alias Namespace.prototype */ var NamespacePrototype = Namespace.prototype; /** @alias Service.prototype */ @@ -3694,9 +3561,9 @@ var ServicePrototype = Namespace.extend(Service); Service.className = "Service"; -var Method = require(19), - util = require(31), - rpc = require(26); +var Method = require(18), + util = require(30), + rpc = require(25); /** * Constructs a new service instance. @@ -3866,7 +3733,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel /* istanbul ignore next */ if (!request) - throw util._TypeError("request", "not null"); + throw TypeError("request must not be null"); method.resolve(); var requestData; @@ -3902,11 +3769,11 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel return rpcService; }; -},{"19":19,"20":20,"26":26,"31":31}],29:[function(require,module,exports){ +},{"18":18,"19":19,"25":25,"30":30}],28:[function(require,module,exports){ "use strict"; module.exports = Type; -var Namespace = require(20); +var Namespace = require(19); /** @alias Namespace.prototype */ var NamespacePrototype = Namespace.prototype; /** @alias Type.prototype */ @@ -3914,19 +3781,19 @@ var TypePrototype = Namespace.extend(Type); Type.className = "Type"; -var Enum = require(15), - OneOf = require(22), - Field = require(16), - Service = require(28), - Class = require(10), - Message = require(18), - Reader = require(23), +var Enum = require(14), + OneOf = require(21), + Field = require(15), + Service = require(27), + Class = require(9), + Message = require(17), + Reader = require(22), Writer = require(36), - util = require(31), - encoder = require(14), - decoder = require(13), + util = require(30), + encoder = require(13), + decoder = require(12), verifier = require(35), - converter = require(11); + converter = require(10); /** * Constructs a new reflected message type instance. @@ -4080,7 +3947,7 @@ Object.defineProperties(TypePrototype, { }, set: function(ctor) { if (ctor && !(ctor.prototype instanceof Message)) - throw util._TypeError("ctor", "a Message constructor"); + throw TypeError("ctor must be a Message constructor"); if (!ctor.from) ctor.from = Message.from; this._ctor = ctor; @@ -4342,7 +4209,7 @@ TypePrototype.convert = function convert_setup(source, impl, options) { return this.setup().convert(source, impl, options); // overrides this method }; -},{"10":10,"11":11,"13":13,"14":14,"15":15,"16":16,"18":18,"20":20,"22":22,"23":23,"28":28,"31":31,"35":35,"36":36}],30:[function(require,module,exports){ +},{"10":10,"12":12,"13":13,"14":14,"15":15,"17":17,"19":19,"21":21,"22":22,"27":27,"30":30,"35":35,"36":36,"9":9}],29:[function(require,module,exports){ "use strict"; /** @@ -4351,7 +4218,7 @@ TypePrototype.convert = function convert_setup(source, impl, options) { */ var types = exports; -var util = require(31); +var util = require(30); var s = [ "double", // 0 @@ -4536,7 +4403,7 @@ types.packed = bake([ /* bool */ 0 ]); -},{"31":31}],31:[function(require,module,exports){ +},{"30":30}],30:[function(require,module,exports){ "use strict"; /** @@ -4547,10 +4414,10 @@ var util = module.exports = require(34); util.asPromise = require(1); util.codegen = require(32); -util.EventEmitter = require(3); -util.extend = require(4); -util.fetch = require(5); -util.path = require(7); +util.EventEmitter = require(2); +util.extend = require(3); +util.fetch = require(4); +util.path = require(6); /** * Node's fs module if available. @@ -4564,25 +4431,9 @@ util.fs = util.inquire("fs"); * @returns {Array.<*>} Converted array */ util.toArray = function toArray(object) { - if (!object) - return []; - var names = Object.keys(object), - length = names.length; - var array = new Array(length); - for (var i = 0; i < length; ++i) - array[i] = object[names[i]]; - return array; -}; - -/** - * Creates a type error. - * @param {string} name Argument name - * @param {string} [description="a string"] Expected argument descripotion - * @returns {TypeError} Created type error - * @private - */ -util._TypeError = function(name, description) { - return TypeError(name + " must be " + (description || "a string")); + return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) { + return object[key]; + }) : []; }; /** @@ -4612,14 +4463,23 @@ util.safeProp = function safeProp(prop) { }; /** - * Converts the second character of a string to lower case. + * Converts the first character of a string to lower case. * @param {string} str String to convert * @returns {string} Converted string */ -util.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util +util.lcFirst = function lcFirst(str) { return str.charAt(0).toLowerCase() + str.substring(1); }; +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + /** * Creates a new buffer of whatever type supported by the environment. * @param {number} [size=0] Buffer size @@ -4632,7 +4492,138 @@ util.newBuffer = function newBuffer(size) { : new (typeof Uint8Array !== "undefined" ? Uint8Array : Array)(size); }; -},{"1":1,"3":3,"32":32,"34":34,"4":4,"5":5,"7":7}],32:[function(require,module,exports){ +},{"1":1,"2":2,"3":3,"32":32,"34":34,"4":4,"6":6}],31:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + string[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + string[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + string[i++] = b64[t | b >> 6]; + string[i++] = b64[b & 63]; + j = 0; + break; + } + } + if (j) { + string[i++] = b64[t]; + string[i ] = 61; + if (j === 1) + string[i + 1] = 61; + } + return String.fromCharCode.apply(String, string); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],32:[function(require,module,exports){ "use strict"; module.exports = codegen; @@ -4990,10 +4981,10 @@ LongBitsPrototype.length = function length() { var util = exports; util.LongBits = require(33); -util.base64 = require(2); -util.inquire = require(6); -util.utf8 = require(9); -util.pool = require(8); +util.base64 = require(31); +util.inquire = require(5); +util.utf8 = require(8); +util.pool = require(7); /** * Whether running within node or not. @@ -5002,13 +4993,6 @@ util.pool = require(8); */ util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node); -/** - * Whether running within IE8 or not. - * @memberof util - * @type {boolean} - */ -util.isIE8 = false; try { util.isIE8 = eval("!-[1,]"); } catch (e) {} // eslint-disable-line no-eval, no-empty - /** * Node's Buffer class if available. * @type {?function(new: Buffer)} @@ -5115,15 +5099,6 @@ util.longNe = function longNe(val, lo, hi) { return bits.lo !== lo || bits.hi !== hi; }; -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util - return str.charAt(0).toUpperCase() + str.substring(1); -}; - /** * An immuable empty array. * @memberof util @@ -5137,14 +5112,28 @@ util.emptyArray = Object.freeze ? Object.freeze([]) : []; */ util.emptyObject = Object.freeze ? Object.freeze({}) : {}; +/** + * Tests if two arrays are not equal. + * @param {Array.<*>} a Array 1 + * @param {Array.<*>} b Array 2 + * @returns {boolean} `true` if not equal, otherwise `false` + */ +util.arrayNe = function arrayNe(a, b) { + if (a.length === b.length) + for (var i = 0; i < a.length; ++i) + if (a[i] !== b[i]) + return true; + return false; +}; + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"2":2,"33":33,"6":6,"8":8,"9":9}],35:[function(require,module,exports){ +},{"31":31,"33":33,"5":5,"7":7,"8":8}],35:[function(require,module,exports){ "use strict"; module.exports = verifier; -var Enum = require(15), - util = require(31); +var Enum = require(14), + util = require(30); function invalid(field, expected) { return field.fullName.substring(1) + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; @@ -5290,7 +5279,7 @@ function verifier(mtype) { ("return null"); /* eslint-enable no-unexpected-multiline */ } -},{"15":15,"31":31}],36:[function(require,module,exports){ +},{"14":14,"30":30}],36:[function(require,module,exports){ "use strict"; module.exports = Writer; @@ -5999,33 +5988,33 @@ try { // Serialization protobuf.Writer = require(36); protobuf.BufferWriter = require(37); -protobuf.Reader = require(23); -protobuf.BufferReader = require(24); -protobuf.encoder = require(14); -protobuf.decoder = require(13); +protobuf.Reader = require(22); +protobuf.BufferReader = require(23); +protobuf.encoder = require(13); +protobuf.decoder = require(12); protobuf.verifier = require(35); -protobuf.converter = require(11); +protobuf.converter = require(10); // Reflection -protobuf.ReflectionObject = require(21); -protobuf.Namespace = require(20); -protobuf.Root = require(25); -protobuf.Enum = require(15); -protobuf.Type = require(29); -protobuf.Field = require(16); -protobuf.OneOf = require(22); -protobuf.MapField = require(17); -protobuf.Service = require(28); -protobuf.Method = require(19); +protobuf.ReflectionObject = require(20); +protobuf.Namespace = require(19); +protobuf.Root = require(24); +protobuf.Enum = require(14); +protobuf.Type = require(28); +protobuf.Field = require(15); +protobuf.OneOf = require(21); +protobuf.MapField = require(16); +protobuf.Service = require(27); +protobuf.Method = require(18); // Runtime -protobuf.Class = require(10); -protobuf.Message = require(18); +protobuf.Class = require(9); +protobuf.Message = require(17); // Utility -protobuf.types = require(30); -protobuf.rpc = require(26); -protobuf.util = require(31); +protobuf.types = require(29); +protobuf.rpc = require(25); +protobuf.util = require(30); protobuf.configure = configure; /* istanbul ignore next */ @@ -6050,7 +6039,7 @@ if (typeof define === "function" && define.amd) }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"10":10,"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,"35":35,"36":36,"37":37,"undefined":undefined}]},{},[38]) +},{"10":10,"12":12,"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,"27":27,"28":28,"29":29,"30":30,"35":35,"36":36,"37":37,"9":9,"undefined":undefined}]},{},[38]) //# sourceMappingURL=protobuf.js.map diff --git a/dist/noparse/protobuf.js.map b/dist/noparse/protobuf.js.map index 76015bac6..3dd95d9a8 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/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/converter.js","src/converters.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/codegen/index.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;;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;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5TA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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 = 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(6);\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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(15),\r\n converters = require(12),\r\n util = require(31);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, field.defaultValue);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(34);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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&&%s!==null&&util.longNe(%s,%d,%d))\", ref, 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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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\nObject.defineProperties(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: 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/**\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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\nObject.defineProperties(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() {\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.nestedArray)\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.nestedArray;\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.nestedArray;\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.nestedArray, 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.root.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\nObject.defineProperties(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() {\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: function() {\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.root;\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.root;\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 if (!Root)\r\n Root = require(25);\r\n if (this.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 fullName = this.fullName;\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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(34);\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 + \" at offset \" + this.pos);\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(34);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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(10),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(36),\r\n util = require(31),\r\n encoder = require(14),\r\n decoder = require(13),\r\n verifier = require(35),\r\n converter = require(11);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(34);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(32);\r\nutil.EventEmitter = require(3);\r\nutil.extend = require(4);\r\nutil.fetch = require(5);\r\nutil.path = require(7);\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\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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(34);\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 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 * 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 util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(36);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(34);\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\nprotobuf.converter = require(\"./converter\");\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 +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/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/converter.js","src/converters.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/base64/index.js","src/util/codegen/index.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;;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;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5TA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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\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(5);\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(17),\r\n util = require(30);\r\n\r\nvar Type; // cyclic\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(28);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type must be a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor must be 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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(14),\r\n converters = require(11),\r\n util = require(30);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, Array.prototype.slice.call(field.defaultValue));\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(34);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(14),\r\n types = require(29),\r\n util = require(30);\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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) gen\r\n (\"if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))\", ref, ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n else if (field.bytes) gen\r\n (\"if(%s&&%s.length\" + (field.defaultValue.length ? \"&&util.arrayNe(%s,%j)\" : \"\") + \")\", ref, ref, ref, Array.prototype.slice.call(field.defaultValue));\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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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(20);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(30);\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id must be 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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 must be a string\");\r\n var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(20);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(14),\r\n types = require(29),\r\n util = require(30);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\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 must be a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type must be a string\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend must be a string\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule must be a string rule\");\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\nObject.defineProperties(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: 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/**\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(16);\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(28);\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 } else if (this.bytes && typeof this.defaultValue === \"string\") {\r\n var buf;\r\n if (util.base64.test(this.defaultValue))\r\n util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0);\r\n else\r\n util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0);\r\n this.defaultValue = buf;\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(15);\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(29),\r\n util = require(30);\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 TypeError(\"keyType must be a string\");\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 converters = require(11);\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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(20);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(28),\r\n util = require(30);\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType must be a string\");\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(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(14),\r\n Field = require(15),\r\n util = require(30);\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(28);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(27);\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\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\nObject.defineProperties(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() {\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.nestedArray)\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 + \" must be 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 must be \" + nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object must be 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.nestedArray;\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 must be 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(28);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(27);\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.nestedArray;\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.nestedArray, 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.root.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(28);\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(27);\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(30);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options must be 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\nObject.defineProperties(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() {\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: function() {\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.root;\r\n if (!Root)\r\n Root = require(24);\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.root;\r\n if (!Root)\r\n Root = require(24);\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 if (!Root)\r\n Root = require(24);\r\n if (this.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 fullName = this.fullName;\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(20);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(15);\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 must be an Array\");\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 must be 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 must be 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(34);\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(23);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(22);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(34);\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(19);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(15),\r\n util = require(30);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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(26);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(30);\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(19);\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(18),\r\n util = require(30),\r\n rpc = require(25);\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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 TypeError(\"request must not be 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(19);\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(14),\r\n OneOf = require(21),\r\n Field = require(15),\r\n Service = require(27),\r\n Class = require(9),\r\n Message = require(17),\r\n Reader = require(22),\r\n Writer = require(36),\r\n util = require(30),\r\n encoder = require(13),\r\n decoder = require(12),\r\n verifier = require(35),\r\n converter = require(10);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw TypeError(\"ctor must be 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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(30);\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(34);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(32);\r\nutil.EventEmitter = require(2);\r\nutil.extend = require(3);\r\nutil.fetch = require(4);\r\nutil.path = require(6);\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 return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) {\r\n return object[key];\r\n }) : [];\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 first 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) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\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) {\r\n return str.charAt(0).toUpperCase() + 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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = 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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(34);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(14),\r\n util = require(30);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(36);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(34);\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\nprotobuf.converter = require(\"./converter\");\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 cc40e96f7..69daa5412 100644 --- a/dist/noparse/protobuf.min.js +++ b/dist/noparse/protobuf.min.js @@ -1,9 +1,9 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ -!function t(e,n,r){function i(o,u){if(!n[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=n[o]={exports:{}};e[o][0].call(h.exports,function(t){var n=e[o][1][t];return i(n?n:t)},h,h.exports,t,e,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};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++;r.encode=function(t,e,n){for(var r,s=[],o=0,u=0;e>2],r=(3&f)<<4,u=1;break;case 1:s[o++]=i[r|f>>4],r=(15&f)<<2,u=2;break;case 2:s[o++]=i[r|f>>6],s[o++]=i[63&f],u=0}}return u&&(s[o++]=i[r],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";r.decode=function(t,e,n){for(var r,i=n,o=0,f=0;f1)break;if(void 0===(a=s[a]))throw Error(u);switch(o){case 0:r=a,o=1;break;case 1:e[n++]=r<<2|(48&a)>>4,r=a,o=2;break;case 2:e[n++]=(15&r)<<4|(60&a)>>2,r=a,o=3;break;case 3:e[n++]=(3&r)<<6|a,o=0}}if(1===o)throw Error(u);return n-i}},{}],3:[function(t,e,n){"use strict";function r(){this.a={}}e.exports=r;var i=r.prototype;i.on=function(t,e,n){return(this.a[t]||(this.a[t]=[])).push({fn:e,ctx:n||this}),this},i.off=function(t,e){if(void 0===t)this.a={};else if(void 0===e)this.a[t]=[];else for(var n=this.a[t],r=0;r0?e.splice(--s,2):n?e.splice(s,1):++s:"."===e[s]?e.splice(s,1):++s;return r+e.join("/")};r.resolve=function(t,e,n){return n||(e=s(e)),i(e)?e:(n||(t=s(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?s(t+"/"+e):e)}},{}],8:[function(t,e,n){"use strict";function r(t,e,n){var r=n||8192,i=r>>>1,s=null,o=r;return function(n){if(n<1||n>i)return t(n);o+n>r&&(s=t(r),o=0);var u=e.call(s,o,o+=n);return 7&o&&(o=(7|o)+1),u}}e.exports=r},{}],9:[function(t,e,n){"use strict";var r=n;r.length=function(t){for(var e=0,n=0,r=0;r191&&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)):""},r.write=function(t,e,n){for(var r,i,s=n,o=0;o>6|192,e[n++]=63&r|128):55296===(64512&r)&&56320===(64512&(i=t.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&i),++o,e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128);return n-s}},{}],10:[function(t,e,n){"use strict";function r(t){return i(t)}function i(e,n){if(s||(s=t(29)),!(e instanceof s))throw f("type","a Type");if(n){if("function"!=typeof n)throw f("ctor","a function")}else n=function(t){return function(e){t.call(this,e)}}(o);n.constructor=r;var i=n.prototype=new o;return i.constructor=n,u.merge(n,o,!0),n.$type=e,i.$type=e,e.fieldsArray.forEach(function(t){i[t.name]=Array.isArray(t.resolve().defaultValue)?u.emptyArray:u.isObject(t.defaultValue)&&!t.long?u.emptyObject:t.defaultValue}),e.oneofsArray.forEach(function(t){Object.defineProperty(i,t.resolve().name,{get:function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(t.oneof.indexOf(e[n])>-1)return e[n]},set:function(e){for(var n=t.oneof,r=0;r>>3){");for(var r=0;r>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",n,r,(e.id<<3|2)>>>0)}function i(t){for(var e,n,i=t.fieldsArray,f=t.oneofsArray,a=u.codegen("m","w")("if(!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().ldelim()",e,n):a(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,l,n),a("}")("}")}else h.repeated?h.packed&&void 0!==o.packed[l]?a("if(%s&&%s.length){",n,n)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",n)("w.%s(%s[i])",l,n)("w.ldelim()",h.id)("}"):(a("if(%s){",n)("for(var i=0;i<%s.length;++i)",n),void 0===c?r(a,h,e,n+"[i]"):a("w.uint32(%d).%s(%s[i])",(h.id<<3|c)>>>0,l,n),a("}")):h.partOf||(h.required||(h.long?a("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",n,n,n,h.defaultValue.low,h.defaultValue.high):a("if(%s!==undefined&&%s!==%j)",n,n,h.defaultValue)),void 0===c?r(a,h,e,n):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,n))}for(var e=0;e>>0,l,n),a("break;")}a("}")}return a("return w")}e.exports=i;var s=t(15),o=t(30),u=t(31)},{15:15,30:30,31:31}],15:[function(t,e,n){"use strict";function r(t,e,n){i.call(this,t,n),this.valuesById={},this.values=Object.create(this.valuesById);var r=this;Object.keys(e||{}).forEach(function(t){var n;"number"==typeof e[t]?n=e[t]:(n=parseInt(t,10),t=e[t]),r.valuesById[r.values[t]=n]=t})}e.exports=r;var i=t(21),s=i.extend(r);r.className="Enum";var o=t(31),u=o.b;r.testJSON=function(t){return Boolean(t&&t.values)},r.fromJSON=function(t,e){return new r(t,e.values,e.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(t,e){if(!o.isString(t))throw u("name");if(!o.isInteger(e)||e<0)throw u("id","a non-negative integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(void 0!==this.valuesById[e])throw Error("duplicate id "+e+" in "+this);return this.valuesById[this.values[t]=e]=t,this},s.remove=function(t){if(!o.isString(t))throw u("name");var e=this.values[t];if(void 0===e)throw Error("'"+t+"' is not a name of "+this);return delete this.valuesById[e],delete this.values[t],this}},{21:21,31:31}],16:[function(t,e,n){"use strict";function r(t,e,n,r,s,o){if(h.isObject(r)?(o=r,r=s=void 0):h.isObject(s)&&(o=s,s=void 0),i.call(this,t,o),!h.isInteger(e)||e<0)throw l("id","a non-negative integer");if(!h.isString(n))throw l("type");if(void 0!==s&&!h.isString(s))throw l("extend");if(void 0!==r&&!/^required|optional|repeated$/.test(r=r.toString().toLowerCase()))throw l("rule","a valid rule string");this.rule=r&&"optional"!==r?r:void 0,this.type=n,this.id=e,this.extend=s||void 0,this.required="required"===r,this.optional=!this.required,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!h.Long&&void 0!==a.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null}e.exports=r;var i=t(21),s=i.extend(r);r.className="Field";var o,u,f=t(15),a=t(30),h=t(31),l=h.b;Object.defineProperties(s,{packed:{get:function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}}),s.setOption=function(t,e,n){return"packed"===t&&(this.c=null),i.prototype.setOption.call(this,t,e,n)},r.testJSON=function(t){return Boolean(t&&void 0!==t.id)},r.fromJSON=function(e,n){return void 0!==n.keyType?(u||(u=t(17)),u.fromJSON(e,n)):new r(e,n.id,n.type,n.rule,n.extend,n.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.resolvedType instanceof f&&"string"==typeof this.defaultValue&&(this.defaultValue=this.resolvedType.values[this.defaultValue]||0)):this.defaultValue=e,this.long&&(this.defaultValue=h.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue))),i.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(t,e,n){"use strict";function r(t,e,n,r,s){if(i.call(this,t,e,r,s),!f.isString(n))throw f.b("keyType");this.keyType=n,this.resolvedKeyType=null,this.map=!0}e.exports=r;var i=t(16),s=i.prototype,o=i.extend(r);r.className="MapField";var u=t(30),f=t(31);r.testJSON=function(t){return i.testJSON(t)&&void 0!==t.keyType},r.fromJSON=function(t,e){return new r(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,n){"use strict";function r(t){if(t)for(var e=Object.keys(t),n=0;n0;){var r=t.shift();if(n.nested&&n.nested[r]){if(n=n.nested[r],!(n instanceof i))throw Error("path conflicts with non-namespace objects")}else n.add(n=new i(r))}return e&&n.addJSON(e),n},f.resolve=function(){a||(a=t(29)),h||(a=t(28));for(var e=this.nestedArray,n=0;n-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(n){var r=t.get(n);r&&!r.partOf&&(r.partOf=e,e.h.push(r))}),i(this)},o.onRemove=function(t){this.h.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,n){"use strict";function r(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 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 r(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 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(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 r(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 r(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=i;var b,w=t(34),O=w.LongBits,x=w.utf8;i.create=w.Buffer?function(e){return b||(b=t(24)),(i.create=function(t){return new b(t)})(e)}:function(t){return new i(t)};var k=i.prototype;k.i=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,r(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 r(this,4);return c(this.buf,this.pos+=4)},k.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var A="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(n,r){return e[0]=n[r],e[1]=n[r+1],e[2]=n[r+2],e[3]=n[r+3],t[0]}:function(n,r){return e[3]=n[r],e[2]=n[r+1],e[1]=n[r+2],e[0]=n[r+3],t[0]}}():function(t,e){var n=c(t,e+4),r=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255===i?s?NaN:r*(1/0):0===i?1.401298464324817e-45*r*s:r*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=A(this.buf,this.pos);return this.pos+=4,t};var S="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(n,r){return e[0]=n[r],e[1]=n[r+1],e[2]=n[r+2],e[3]=n[r+3],e[4]=n[r+4],e[5]=n[r+5],e[6]=n[r+6],e[7]=n[r+7],t[0]}:function(n,r){return e[7]=n[r],e[6]=n[r+1],e[5]=n[r+2],e[4]=n[r+3],e[3]=n[r+4],e[2]=n[r+5],e[1]=n[r+6],e[0]=n[r+7],t[0]}}():function(t,e){var n=c(t,e+4),r=c(t,e+8),i=2*(r>>31)+1,s=r>>>20&2047,o=4294967296*(1048575&r)+n;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=S(this.buf,this.pos);return this.pos+=8,t},k.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,e===n?new this.buf.constructor(0):this.i.call(this.buf,e,n)},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 r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(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+" at offset "+this.pos)}return this},i.j=m,m()},{24:24,34:34}],24:[function(t,e,n){"use strict";function r(t){i.call(this,t)}e.exports=r;var i=t(23),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=t(34);o.Buffer&&(s.i=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,34:34}],25:[function(t,e,n){"use strict";function r(t){o.call(this,"",t),this.deferred=[],this.files=[]}function i(){}function s(t){var e=t.parent.lookup(t.extend);if(e){var n=new h(t.fullName,t.id,t.type,t.rule,(void 0),t.options);return n.declaringField=t,t.extensionField=n,e.add(n),!0}return!1}e.exports=r;var o=t(20),u=o.extend(r);r.className="Root";var f,a,h=t(16),l=t(31);r.fromJSON=function(t,e){return e||(e=new r),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,n,r){function s(t,e){if(r){var n=r;r=null,n(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 r=f(e,h,n);r.imports&&r.imports.forEach(function(e){u(h.resolvePath(t,e))}),r.weakImports&&r.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 n=t.lastIndexOf("google/protobuf/");if(n>-1){var i=t.substring(n);i in a&&(t=i)}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(n,i){if(--p,r)return n?void(e||s(n)):void o(t,i)})}}c&&c(),"function"==typeof n&&(r=n,n=void 0);var h=this;if(!r)return l.asPromise(t,h,e);var d=r===i,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,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.f=function(t){var e=this.deferred.slice();this.deferred=[];for(var n=0;n-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof o)for(var n=t.nestedArray,r=0;r ").replace(/\t/g," "));var s=Object.keys(n||(n={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return n[t]}))}for(var h=[],l=[],c=1,d=!1,p=0;p>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if("string"==typeof t){if(!i.Long)return r.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+4294967296*n)}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 f=String.prototype.charCodeAt;r.fromHash=function(t){return t===u?o:new r((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,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},{34:34}],34:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(33),util.base64=require(2),util.inquire=require(6),util.utf8=require(9),util.pool=require(8),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,n){return new t(e,n)}),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 n=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))},util.longNe=function(t,e,n){if("object"==typeof t)return t.low!==e||t.high!==n;var r=util.LongBits.from(t);return r.lo!==e||r.hi!==n},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},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:{})},{2:2,33:33,6:6,8:8,9:9}],35:[function(t,e,n){"use strict";function r(t,e){return t.fullName.substring(1)+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function i(t,e,n,i){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",i)("default:")("return%j",r(e,"enum value"));for(var s=f.toArray(e.resolvedType.values),o=0;o127;)e[n++]=127&t|128,t>>>=7;e[n]=t}function a(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function h(t,e,n){e[n++]=255&t,e[n++]=t>>>8&255,e[n++]=t>>>16&255,e[n]=t>>>24}e.exports=o;var l,c=t(34),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=t(37)),(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,n){return this.tail=this.tail.next=new r(t,e,n),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(n,r,i){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i]=e[3]}:function(n,r,i){t[0]=n,r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,n){var r=t<0?1:0;if(r&&(t=-t),0===t)h(1/t>0?0:2147483648,e,n);else if(isNaN(t))h(2147483647,e,n);else if(t>3.4028234663852886e38)h((r<<31|2139095040)>>>0,e,n);else if(t<1.1754943508222875e-38)h((r<<31|Math.round(t/1.401298464324817e-45))>>>0,e,n);else{var i=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-i)*8388608);h((r<<31|i+127<<23|s)>>>0,e,n)}};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(n,r,i){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i++]=e[3],r[i++]=e[4],r[i++]=e[5],r[i++]=e[6],r[i]=e[7]}:function(n,r,i){t[0]=n,r[i++]=e[7],r[i++]=e[6],r[i++]=e[5],r[i++]=e[4],r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,n){var r=t<0?1:0;if(r&&(t=-t),0===t)h(0,e,n),h(1/t>0?0:2147483648,e,n+4);else if(isNaN(t))h(4294967295,e,n),h(2147483647,e,n+4);else if(t>1.7976931348623157e308)h(0,e,n),h((r<<31|2146435072)>>>0,e,n+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,h(i>>>0,e,n),h((r<<31|i/4294967296)>>>0,e,n+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),i=t*Math.pow(2,-s),h(4503599627370496*i>>>0,e,n),h((r<<31|s+1023<<20|1048576*i&1048575)>>>0,e,n+4)}}};y.double=function(t){return this.push(m,8,t)};var b=c.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var r=0;r>>0;if("string"==typeof t&&e){var n=o.alloc(e=p.length(t));p.decode(t,n,0),t=n}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 r(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 r(i,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n).tail.next=t.next,this.tail=e,this.len+=n,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e}},{34:34,37:37}],37:[function(t,e,n){"use strict";function r(){s.call(this)}function i(t,e,n){t.length<40?f.write(t,e,n):e.utf8Write(t,n)}e.exports=r;var s=t(36),o=r.prototype=Object.create(s.prototype);o.constructor=r;var u=t(34),f=u.utf8,a=u.Buffer;r.alloc=function(t){return(r.alloc=a.allocUnsafe)(t)};var h=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){t.copy(e,n,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(i,e,t),this}},{34:34,36:36}],38:[function(t,e,n){(function(e){"use strict";function r(t,e,n){return"function"==typeof e?(n=e,e=new o.Root):e||(e=new o.Root),e.load(t,n)}function i(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.j()}var o=e.protobuf=n;o.load=r,o.loadSync=i,o.roots={};try{o.tokenize=t("./tokenize"),o.parse=t("./parse"),o.common=t("./common")}catch(t){}o.Writer=t(36),o.BufferWriter=t(37),o.Reader=t(23),o.BufferReader=t(24),o.encoder=t(14),o.decoder=t(13),o.verifier=t(35),o.converter=t(11),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(10),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:{})},{10:10,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,35:35,36:36,37:37,undefined:void 0}]},{},[38]); +!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[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=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],7:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],8:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],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(e,t,r){for(var n,i,s=r,o=0;o>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],9:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(28)),!(t instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=function(e){return function(t){e.call(this,t)}}(o);r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n>>3){");for(var n=0;n>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,f=e.oneofsArray,a=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t>>0,8|o.mapKey[d],d),void 0===c?a("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):a(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,l,r),a("}")("}")}else h.repeated?h.packed&&void 0!==o.packed[l]?a("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",l,r)("w.ldelim()",h.id)("}"):(a("if(%s){",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(a,h,t,r+"[i]"):a("w.uint32(%d).%s(%s[i])",(h.id<<3|c)>>>0,l,r),a("}")):h.partOf||(h.required||(h.long?a("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,h.defaultValue.low,h.defaultValue.high):h.bytes?a("if(%s&&%s.length"+(h.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(h.defaultValue)):a("if(%s!==undefined&&%s!==%j)",r,r,h.defaultValue)),void 0===c?n(a,h,t,r):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,r))}for(var t=0;t>>0,l,r),a("break;")}a("}")}return a("return w")}t.exports=i;var s=e(14),o=e(29),u=e(30)},{14:14,29:29,30:30}],14:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(20),s=i.extend(n);n.className="Enum";var o=e(30);n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{20:20,30:30}],15:[function(e,t,r){"use strict";function n(e,t,r,n,s,o){if(h.isObject(n)?(o=n,n=s=void 0):h.isObject(s)&&(o=s,s=void 0),i.call(this,e,o),!h.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!h.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!h.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,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[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}t.exports=n;var i=e(20),s=i.extend(n);n.className="Field";var o,u,f=e(14),a=e(29),h=e(30);Object.defineProperties(s,{packed:{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(16)),u.fromJSON(t,r)):new n(t,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 t=a.defaults[this.type];if(void 0===t)if(o||(o=e(28)),this.resolvedType=this.parent.lookup(this.type,o))t=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);t=0}if(this.map)this.defaultValue={};else if(this.repeated)this.defaultValue=[];else if(this.options&&void 0!==this.options.default?(this.defaultValue=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.defaultValue&&(this.defaultValue=this.resolvedType.values[this.defaultValue]||0)):this.defaultValue=t,this.long)this.defaultValue=h.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue);else if(this.bytes&&"string"==typeof this.defaultValue){var r;h.base64.test(this.defaultValue)?h.base64.decode(this.defaultValue,r=h.newBuffer(h.base64.length(this.defaultValue)),0):h.utf8.write(this.defaultValue,r=h.newBuffer(h.utf8.length(this.defaultValue)),0),this.defaultValue=r}return i.prototype.resolve.call(this)}},{14:14,16:16,20:20,28:28,29:29,30:30}],16:[function(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(15),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(29),f=e(30);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.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)}},{15:15,29:29,30:30}],17:[function(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r0;){var n=e.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 t&&r.addJSON(t),r},f.resolve=function(){a||(a=e(28)),h||(a=e(27));for(var t=this.nestedArray,r=0;r-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{15:15,20:20}],22:[function(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new O(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}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(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-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 m(){return d.call(this).zzDecode().toNumber()}function g(){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=m)}t.exports=i;var b,w=e(34),O=w.LongBits,x=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(23)),(i.create=function(e){return w.Buffer.isBuffer(e)?new b(e):new i(e)})(t)}:function(e){return new i(e)};var k=i.prototype;k.h=w.Array.prototype.subarray||w.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|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 e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+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)};k.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+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)};k.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=N(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.h.call(this.buf,t,r)},k.string=function(){var e=this.bytes();return x.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},k.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.i=g,g()},{23:23,34:34}],23:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(22),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(34);o.Buffer&&(s.h=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{22:22,34:34}],24:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new h(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(19),u=o.extend(n);n.className="Root";var f,a,h=e(15),l=e(30);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){f.filename=e;var n=f(t,h,r);n.imports&&n.imports.forEach(function(t){u(h.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(h.resolvePath(e,t),!0)})}else h.setOptions(t.options).addJSON(t.nested)}catch(e){return void s(e)}d||p||s(null,h)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in a&&(e=i)}if(!(h.files.indexOf(e)>-1)){if(h.files.push(e),e in a)return void(d?o(e,a[e]):(++p,setTimeout(function(){--p,o(e,a[e])})));if(d){var u;try{u=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,l.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var h=this;if(!n)return l.asPromise(e,h,t);var d=n===i,p=0;return l.isString(t)&&(t=[t]),t.forEach(function(e){u(h.resolvePath("",e))}),d?h:void(p||s(null,h))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,n=0;n1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.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(e,t,r){for(var n,s=[],o=0,u=0;t>2],n=(3&f)<<4,u=1;break;case 1:s[o++]=i[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[o++]=i[n|f>>6],s[o++]=i[63&f],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(e,t,r){for(var n,i=r,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:t[r++]=n<<2|(48&a)>>4,n=a,o=2;break;case 2:t[r++]=(15&n)<<4|(60&a)>>2,n=a,o=3;break;case 3:t[r++]=(3&n)<<6|a,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],32:[function(e,t,r){"use strict";function n(){function e(){for(var t=[],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(e){return r[e]}))}for(var h=[],l=[],c=1,d=!1,p=0;p>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var f=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((f.call(e,0)|f.call(e,1)<<8|f.call(e,2)<<16|f.call(e,3)<<24)>>>0,(f.call(e,4)|f.call(e,5)<<8|f.call(e,6)<<16|f.call(e,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 e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{34:34}],34:[function(e,t,r){(function(t){"use strict";var n=r;n.LongBits=e(33),n.base64=e(31),n.inquire=e(5),n.utf8=e(8),n.pool=e(7),n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node),n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=t.dcodeIO&&t.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var i=n.LongBits.from(e);return i.lo!==t||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(e,t){if(e.length===t.length)for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var l,c=e(34),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=e(37)),(o.create=function(){return new l})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(f,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(a,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(a,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(a,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(h,4,e>>>0)},y.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var m="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(m,4,e)};var g="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(g,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):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 e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{34:34,37:37}],37:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?f.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(36),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(34),f=u.utf8,a=u.Buffer;n.alloc=function(e){return(n.alloc=a.allocUnsafe)(e)};var h=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=a.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(h,t,e),this},o.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{34:34,36:36}],38:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.i()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e("./tokenize"),o.parse=e("./parse"),o.common=e("./common")}catch(e){}o.Writer=e(36),o.BufferWriter=e(37),o.Reader=e(22),o.BufferReader=e(23),o.encoder=e(13),o.decoder=e(12),o.verifier=e(35),o.converter=e(10),o.ReflectionObject=e(20),o.Namespace=e(19),o.Root=e(24),o.Enum=e(14),o.Type=e(28),o.Field=e(15),o.OneOf=e(21),o.MapField=e(16),o.Service=e(27),o.Method=e(18),o.Class=e(9),o.Message=e(17),o.types=e(29),o.rpc=e(25),o.util=e(30),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,12:12,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,27:27,28:28,29:29,30:30,35:35,36:36,37:37,9:9,undefined:void 0}]},{},[38]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/noparse/protobuf.min.js.gz b/dist/noparse/protobuf.min.js.gz index c51b6ece2..2504dc9b2 100644 Binary files a/dist/noparse/protobuf.min.js.gz and b/dist/noparse/protobuf.min.js.gz differ diff --git a/dist/noparse/protobuf.min.js.map b/dist/noparse/protobuf.min.js.map index b585e0f8f..7791619d9 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/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/converter.js","src/converters.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/codegen/index.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","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","listeners","splice","emit","extend","ctor","keys","Object","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","replace","isAbsolute","test","normalize","parts","split","absolute","prefix","shift","join","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","fieldsArray","forEach","field","name","isArray","defaultValue","emptyArray","isObject","long","emptyObject","oneofsArray","oneof","defineProperty","get","indexOf","set","value","_TypeError","genConvert","fieldIndex","prop","resolvedType","Enum","sprintf","converter","mtype","fields","gen","codegen","convert","safeProp","repeated","converters","json","typeOrCtor","options","fieldsOnly","enums","values","defaults","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","Buffer","isBuffer","message","fromString","newBuffer","decoder","group","ref","id","map","keyType","resolvedKeyType","types","basic","packed","genEncodeType","encoder","oneofs","wireType","mapKey","partOf","required","oneofFields","ReflectionObject","valuesById","self","key","val","parseInt","EnumPrototype","className","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","rule","toLowerCase","optional","extensionField","declaringField","_packed","FieldPrototype","MapField","defineProperties","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","source","impl","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","nested","_nestedArray","_clearProperties","clearCache","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","getEnum","prev","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","root","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucName","ucFirst","_fieldsArray","addFieldsToParent","OneOfPrototype","index","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","JSON","parsed","imports","weakImports","sync","queued","weak","idx","lastIndexOf","altname","substring","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","service","methodsArray","methodName","inherited","requestDelimited","responseDelimited","rpcService","method","lcFirst","request","requestData","setImmediate","responseData","response","err2","extensions","reserved","_fieldsById","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","Writer","verifier","fieldsById","names","repeatedFieldsArray","filter","oneOfName","setup","fld","eof","fork","ldelim","bake","description","dst","src","str","allocUnsafe","line","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","scope","verbose","console","log","Function","concat","format","$0","$1","arg","stringify","supported","LongBitsPrototype","zero","zzEncode","zeroHash","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","isIE8","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","toUpperCase","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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UAAAA,EAaA,kBAAAlD,SAAAA,OAAAoP,KACApP,QAAA,QAAA,SAAA3G,GAKA,MAJAA,KACA4V,EAAAlZ,KAAAsD,KAAAA,EACA6J,KAEA+L","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 = 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(6);\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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(15),\r\n converters = require(12),\r\n util = require(31);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, field.defaultValue);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(34);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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&&%s!==null&&util.longNe(%s,%d,%d))\", ref, 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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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\nObject.defineProperties(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: 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/**\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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\nObject.defineProperties(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() {\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.nestedArray)\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.nestedArray;\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.nestedArray;\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.nestedArray, 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.root.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\nObject.defineProperties(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() {\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: function() {\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.root;\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.root;\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 if (!Root)\r\n Root = require(25);\r\n if (this.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 fullName = this.fullName;\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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(34);\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 + \" at offset \" + this.pos);\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(34);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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(10),\r\n Message = require(18),\r\n Reader = require(23),\r\n Writer = require(36),\r\n util = require(31),\r\n encoder = require(14),\r\n decoder = require(13),\r\n verifier = require(35),\r\n converter = require(11);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(34);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(32);\r\nutil.EventEmitter = require(3);\r\nutil.extend = require(4);\r\nutil.fetch = require(5);\r\nutil.path = require(7);\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\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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(34);\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 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 * 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 util = require(31);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(36);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(34);\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\nprotobuf.converter = require(\"./converter\");\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 +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/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/converter.js","src/converters.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/base64/index.js","src/util/codegen/index.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","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","undefined","listeners","splice","emit","extend","ctor","keys","Object","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","replace","isAbsolute","test","normalize","parts","split","absolute","prefix","shift","join","originPath","includePath","alreadyNormalized","pool","alloc","slice","size","SIZE","MAX","slab","offset","buf","utf8","string","len","c","charCodeAt","read","buffer","start","end","chunk","String","fromCharCode","write","c1","c2","Class","type","Type","TypeError","MessageCtor","properties","Message","util","merge","$type","fieldsArray","forEach","field","name","Array","isArray","defaultValue","emptyArray","isObject","long","emptyObject","oneofsArray","oneof","defineProperty","get","indexOf","set","value","genConvert","fieldIndex","prop","resolvedType","Enum","sprintf","charAt","converter","mtype","fields","gen","codegen","convert","safeProp","repeated","converters","json","typeOrCtor","options","fieldsOnly","enums","values","defaults","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","base64","encode","Buffer","isBuffer","message","fromString","newBuffer","decode","decoder","group","ref","id","map","keyType","resolvedKeyType","types","basic","packed","genEncodeType","encoder","oneofs","wireType","mapKey","partOf","required","oneofFields","j","ReflectionObject","valuesById","self","key","val","parseInt","EnumPrototype","className","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","rule","toLowerCase","optional","extensionField","declaringField","_packed","FieldPrototype","MapField","defineProperties","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","source","impl","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","nested","_nestedArray","_clearProperties","clearCache","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","getEnum","prev","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","root","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","_fieldsArray","addFieldsToParent","OneOfPrototype","index","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","Math","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","JSON","parsed","imports","weakImports","sync","queued","weak","idx","lastIndexOf","altname","substring","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","service","methodsArray","methodName","inherited","requestDelimited","responseDelimited","rpcService","method","lcFirst","request","requestData","setImmediate","responseData","response","err2","extensions","reserved","_fieldsById","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","Writer","verifier","fieldsById","names","repeatedFieldsArray","filter","oneOfName","setup","fld","eof","fork","ldelim","bake","dst","src","str","ucFirst","toUpperCase","allocUnsafe","p","ceil","b64","s64","b","invalidEncoding","line","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","scope","verbose","console","log","Function","concat","format","$0","$1","arg","stringify","supported","LongBitsPrototype","zero","zzEncode","zeroHash","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","arrayNe","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,GAAA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O,EAAA,IAGAqgB,EAAAna,MAAAlG,EAAA,GACAqgB,EAAA7Z,QAAAxG,EAAA,IAGAqgB,EAAAjV,MAAApL,EAAA,IACAqgB,EAAA/H,IAAAtY,EAAA,IACAqgB,EAAA5Z,KAAAzG,EAAA,IACAqgB,EAAAtM,UAAAA,EAaA,kBAAAhD,SAAAA,OAAAyP,KACAzP,QAAA,QAAA,SAAA/G,GAKA,MAJAA,KACAqW,EAAA5Z,KAAAuD,KAAAA,EACA+J,KAEAsM","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\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(5);\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(17),\r\n util = require(30);\r\n\r\nvar Type; // cyclic\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(28);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type must be a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor must be 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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(14),\r\n converters = require(11),\r\n util = require(30);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, Array.prototype.slice.call(field.defaultValue));\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(34);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(14),\r\n types = require(29),\r\n util = require(30);\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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) gen\r\n (\"if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))\", ref, ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n else if (field.bytes) gen\r\n (\"if(%s&&%s.length\" + (field.defaultValue.length ? \"&&util.arrayNe(%s,%j)\" : \"\") + \")\", ref, ref, ref, Array.prototype.slice.call(field.defaultValue));\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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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(20);\r\n/** @alias Enum.prototype */\r\nvar EnumPrototype = ReflectionObject.extend(Enum);\r\n\r\nEnum.className = \"Enum\";\r\n\r\nvar util = require(30);\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id must be 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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 must be a string\");\r\n var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(20);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nField.className = \"Field\";\r\n\r\nvar Enum = require(14),\r\n types = require(29),\r\n util = require(30);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\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 must be a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type must be a string\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend must be a string\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule must be a string rule\");\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\nObject.defineProperties(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: 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/**\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(16);\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(28);\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 } else if (this.bytes && typeof this.defaultValue === \"string\") {\r\n var buf;\r\n if (util.base64.test(this.defaultValue))\r\n util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0);\r\n else\r\n util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0);\r\n this.defaultValue = buf;\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(15);\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(29),\r\n util = require(30);\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 TypeError(\"keyType must be a string\");\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 converters = require(11);\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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(20);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nMethod.className = \"Method\";\r\n\r\nvar Type = require(28),\r\n util = require(30);\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType must be a string\");\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(20);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nNamespace.className = \"Namespace\";\r\n\r\nvar Enum = require(14),\r\n Field = require(15),\r\n util = require(30);\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(28);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(27);\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\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\nObject.defineProperties(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() {\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.nestedArray)\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 + \" must be 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 must be \" + nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object must be 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.nestedArray;\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 must be 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(28);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(27);\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.nestedArray;\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.nestedArray, 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.root.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(28);\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(27);\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(30);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options must be 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\nObject.defineProperties(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() {\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: function() {\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.root;\r\n if (!Root)\r\n Root = require(24);\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.root;\r\n if (!Root)\r\n Root = require(24);\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 if (!Root)\r\n Root = require(24);\r\n if (this.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 fullName = this.fullName;\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(20);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nOneOf.className = \"OneOf\";\r\n\r\nvar Field = require(15);\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 must be an Array\");\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 must be 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 must be 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(34);\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(23);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(22);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(34);\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(19);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nRoot.className = \"Root\";\r\n\r\nvar Field = require(15),\r\n util = require(30);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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(26);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(30);\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(19);\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(18),\r\n util = require(30),\r\n rpc = require(25);\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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 TypeError(\"request must not be 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(19);\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(14),\r\n OneOf = require(21),\r\n Field = require(15),\r\n Service = require(27),\r\n Class = require(9),\r\n Message = require(17),\r\n Reader = require(22),\r\n Writer = require(36),\r\n util = require(30),\r\n encoder = require(13),\r\n decoder = require(12),\r\n verifier = require(35),\r\n converter = require(10);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw TypeError(\"ctor must be 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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(30);\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(34);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(32);\r\nutil.EventEmitter = require(2);\r\nutil.extend = require(3);\r\nutil.fetch = require(4);\r\nutil.path = require(6);\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 return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) {\r\n return object[key];\r\n }) : [];\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 first 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) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\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) {\r\n return str.charAt(0).toUpperCase() + 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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = 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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(34);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(14),\r\n util = require(30);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(36);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(34);\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\nprotobuf.converter = require(\"./converter\");\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 20c100340..ba592f3b0 100644 --- a/dist/protobuf.js +++ b/dist/protobuf.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -48,128 +48,6 @@ function asPromise(fn, ctx/*, varargs */) { },{}],2:[function(require,module,exports){ "use strict"; - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - string[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - string[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - string[i++] = b64[t | b >> 6]; - string[i++] = b64[b & 63]; - j = 0; - break; - } - } - if (j) { - string[i++] = b64[t]; - string[i ] = 61; - if (j === 1) - string[i + 1] = 61; - } - return String.fromCharCode.apply(String, string); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -},{}],3:[function(require,module,exports){ -"use strict"; module.exports = EventEmitter; /** @@ -249,7 +127,7 @@ EventEmitterPrototype.emit = function emit(evt) { return this; }; -},{}],4:[function(require,module,exports){ +},{}],3:[function(require,module,exports){ "use strict"; module.exports = extend; @@ -271,12 +149,12 @@ function extend(ctor) { return prototype; } -},{}],5:[function(require,module,exports){ +},{}],4:[function(require,module,exports){ "use strict"; module.exports = fetch; var asPromise = require(1), - inquire = require(6); + inquire = require(5); var fs = inquire("fs"); @@ -324,7 +202,7 @@ function fetch_xhr(path, callback) { xhr.send(); } -},{"1":1,"6":6}],6:[function(require,module,exports){ +},{"1":1,"5":5}],5:[function(require,module,exports){ "use strict"; module.exports = inquire; @@ -343,7 +221,7 @@ function inquire(moduleName) { return null; } -},{}],7:[function(require,module,exports){ +},{}],6:[function(require,module,exports){ "use strict"; /** @@ -410,7 +288,7 @@ path.resolve = function resolve(originPath, includePath, alreadyNormalized) { return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; }; -},{}],8:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ "use strict"; module.exports = pool; @@ -460,7 +338,7 @@ function pool(alloc, slice, size) { }; } -},{}],9:[function(require,module,exports){ +},{}],8:[function(require,module,exports){ "use strict"; /** @@ -567,17 +445,15 @@ utf8.write = function(string, buffer, offset) { return offset - start; }; -},{}],10:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ "use strict"; module.exports = Class; -var Message = require(19), - util = require(34); +var Message = require(18), + util = require(33); var Type; // cyclic -var TypeError = util._TypeError; - /** * Constructs a class instance, which is also a message prototype. * @classdesc Runtime class providing the tools to create your own custom classes. @@ -597,16 +473,16 @@ function Class(type) { */ function create(type, ctor) { if (!Type) - Type = require(32); + Type = require(31); /* istanbul ignore next */ if (!(type instanceof Type)) - throw TypeError("type", "a Type"); + throw TypeError("type must be a Type"); if (ctor) { /* istanbul ignore next */ if (typeof ctor !== "function") - throw TypeError("ctor", "a function"); + throw TypeError("ctor must be a function"); } else ctor = (function(MessageCtor) { return function Message(properties) { @@ -711,7 +587,7 @@ Class.prototype = Message; * @returns {?string} `null` if valid, otherwise the reason why it is not */ -},{"19":19,"32":32,"34":34}],11:[function(require,module,exports){ +},{"18":18,"31":31,"33":33}],10:[function(require,module,exports){ "use strict"; module.exports = common; @@ -918,13 +794,13 @@ common("wrappers", { } } }); -},{}],12:[function(require,module,exports){ +},{}],11:[function(require,module,exports){ "use strict"; module.exports = converter; -var Enum = require(16), - converters = require(13), - util = require(34); +var Enum = require(15), + converters = require(12), + util = require(33); var sprintf = util.codegen.sprintf; @@ -941,7 +817,7 @@ function genConvert(field, fieldIndex, prop) { case "sfixed64": return sprintf("f.longs(s%s,%d,%d,%j,o)", prop, 0, 0, field.type.charAt(0) === "u"); case "bytes": - return sprintf("f.bytes(s%s,%j,o)", prop, field.defaultValue); + return sprintf("f.bytes(s%s,%j,o)", prop, Array.prototype.slice.call(field.defaultValue)); } return null; } @@ -1045,7 +921,7 @@ util.merge(converter, converters); * @returns {string|number[]|Uint8Array} Converted value */ -},{"13":13,"16":16,"34":34}],13:[function(require,module,exports){ +},{"12":12,"15":15,"33":33}],12:[function(require,module,exports){ "use strict"; var converters = exports; @@ -1178,13 +1054,13 @@ converters.message = { } }; -},{"37":37}],14:[function(require,module,exports){ +},{"37":37}],13:[function(require,module,exports){ "use strict"; module.exports = decoder; -var Enum = require(16), - types = require(33), - util = require(34); +var Enum = require(15), + types = require(32), + util = require(33); /** * Generates a decoder specific to the specified message type. @@ -1271,13 +1147,13 @@ function decoder(mtype) { /* eslint-enable no-unexpected-multiline */ } -},{"16":16,"33":33,"34":34}],15:[function(require,module,exports){ +},{"15":15,"32":32,"33":33}],14:[function(require,module,exports){ "use strict"; module.exports = encoder; -var Enum = require(16), - types = require(33), - util = require(34); +var Enum = require(15), + types = require(32), + util = require(33); function genEncodeType(gen, field, fieldIndex, ref) { return field.resolvedType.group @@ -1351,10 +1227,11 @@ function encoder(mtype) { } else if (!field.partOf) { if (!field.required) { - if (field.long) { - gen + if (field.long) gen ("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))", ref, ref, ref, field.defaultValue.low, field.defaultValue.high); - } else gen + else if (field.bytes) gen + ("if(%s&&%s.length" + (field.defaultValue.length ? "&&util.arrayNe(%s,%j)" : "") + ")", ref, ref, ref, Array.prototype.slice.call(field.defaultValue)); + else gen ("if(%s!==undefined&&%s!==%j)", ref, ref, field.defaultValue); } @@ -1395,19 +1272,17 @@ function encoder(mtype) { ("return w"); /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ } -},{"16":16,"33":33,"34":34}],16:[function(require,module,exports){ +},{"15":15,"32":32,"33":33}],15:[function(require,module,exports){ "use strict"; module.exports = Enum; -var ReflectionObject = require(22); +var ReflectionObject = require(21); /** @alias Enum.prototype */ var EnumPrototype = ReflectionObject.extend(Enum); Enum.className = "Enum"; -var util = require(34); - -var TypeError = util._TypeError; +var util = require(33); /** * Constructs a new enum instance. @@ -1492,10 +1367,10 @@ EnumPrototype.add = function(name, id) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (this.values[name] !== undefined) throw Error("duplicate name '" + name + "' in " + this); @@ -1516,7 +1391,7 @@ EnumPrototype.add = function(name, id) { */ EnumPrototype.remove = function(name) { if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); var val = this.values[name]; if (val === undefined) throw Error("'" + name + "' is not a name of " + this); @@ -1525,25 +1400,23 @@ EnumPrototype.remove = function(name) { return this; }; -},{"22":22,"34":34}],17:[function(require,module,exports){ +},{"21":21,"33":33}],16:[function(require,module,exports){ "use strict"; module.exports = Field; -var ReflectionObject = require(22); +var ReflectionObject = require(21); /** @alias Field.prototype */ var FieldPrototype = ReflectionObject.extend(Field); Field.className = "Field"; -var Enum = require(16), - types = require(33), - util = require(34); +var Enum = require(15), + types = require(32), + util = require(33); var Type, // cyclic MapField; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. * @classdesc Reflected message field. @@ -1568,16 +1441,16 @@ function Field(name, id, type, rule, extend, options) { /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (!util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend"); + throw TypeError("extend must be a string"); /* istanbul ignore next */ if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule", "a valid rule string"); + throw TypeError("rule must be a string rule"); /** * Field rule, if any. @@ -1729,7 +1602,7 @@ Field.testJSON = function testJSON(json) { Field.fromJSON = function fromJSON(name, json) { if (json.keyType !== undefined) { if (!MapField) - MapField = require(18); + MapField = require(17); return MapField.fromJSON(name, json); } return new Field(name, json.id, json.type, json.rule, json.extend, json.options); @@ -1762,7 +1635,7 @@ FieldPrototype.resolve = function resolve() { // if not a basic type, resolve it if (typeDefault === undefined) { if (!Type) - Type = require(32); + Type = require(31); if (this.resolvedType = this.parent.lookup(this.type, Type)) typeDefault = null; else if (this.resolvedType = this.parent.lookup(this.type, Enum)) @@ -1789,17 +1662,24 @@ FieldPrototype.resolve = function resolve() { this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === "u"); if (Object.freeze) Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + } else if (this.bytes && typeof this.defaultValue === "string") { + var buf; + if (util.base64.test(this.defaultValue)) + util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0); + else + util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0); + this.defaultValue = buf; } } return ReflectionObject.prototype.resolve.call(this); }; -},{"16":16,"18":18,"22":22,"32":32,"33":33,"34":34}],18:[function(require,module,exports){ +},{"15":15,"17":17,"21":21,"31":31,"32":32,"33":33}],17:[function(require,module,exports){ "use strict"; module.exports = MapField; -var Field = require(17); +var Field = require(16); /** @alias Field.prototype */ var FieldPrototype = Field.prototype; /** @alias MapField.prototype */ @@ -1807,8 +1687,8 @@ var MapFieldPrototype = Field.extend(MapField); MapField.className = "MapField"; -var types = require(33), - util = require(34); +var types = require(32), + util = require(33); /** * Constructs a new map field instance. @@ -1826,7 +1706,7 @@ function MapField(name, id, keyType, type, options) { /* istanbul ignore next */ if (!util.isString(keyType)) - throw util._TypeError("keyType"); + throw TypeError("keyType must be a string"); /** * Key type. @@ -1891,11 +1771,11 @@ MapFieldPrototype.resolve = function resolve() { return FieldPrototype.resolve.call(this); }; -},{"17":17,"33":33,"34":34}],19:[function(require,module,exports){ +},{"16":16,"32":32,"33":33}],18:[function(require,module,exports){ "use strict"; module.exports = Message; -var converters = require(13); +var converters = require(12); /** * Constructs a new message instance. @@ -2014,20 +1894,18 @@ Message.convert = function convert(source, impl, options) { return this.$type.convert(source, impl, options); }; -},{"13":13}],20:[function(require,module,exports){ +},{"12":12}],19:[function(require,module,exports){ "use strict"; module.exports = Method; -var ReflectionObject = require(22); +var ReflectionObject = require(21); /** @alias Method.prototype */ var MethodPrototype = ReflectionObject.extend(Method); Method.className = "Method"; -var Type = require(32), - util = require(34); - -var TypeError = util._TypeError; +var Type = require(31), + util = require(33); /** * Constructs a new service method instance. @@ -2055,13 +1933,13 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /* istanbul ignore next */ if (type && !util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (!util.isString(requestType)) - throw TypeError("requestType"); + throw TypeError("requestType must be a string"); /* istanbul ignore next */ if (!util.isString(responseType)) - throw TypeError("responseType"); + throw TypeError("responseType must be a string"); ReflectionObject.call(this, name, options); @@ -2159,19 +2037,19 @@ MethodPrototype.resolve = function resolve() { return ReflectionObject.prototype.resolve.call(this); }; -},{"22":22,"32":32,"34":34}],21:[function(require,module,exports){ +},{"21":21,"31":31,"33":33}],20:[function(require,module,exports){ "use strict"; module.exports = Namespace; -var ReflectionObject = require(22); +var ReflectionObject = require(21); /** @alias Namespace.prototype */ var NamespacePrototype = ReflectionObject.extend(Namespace); Namespace.className = "Namespace"; -var Enum = require(16), - Field = require(17), - util = require(34); +var Enum = require(15), + Field = require(16), + util = require(33); var Type, // cyclic Service; // cyclic @@ -2183,17 +2061,15 @@ function initNested() { /* istanbul ignore next */ if (!Type) - Type = require(32); + Type = require(31); /* istanbul ignore next */ if (!Service) - Service = require(30); + Service = require(29); nestedTypes = [ Enum, Type, Service, Field, Namespace ]; nestedError = "one of " + nestedTypes.map(function(ctor) { return ctor.name; }).join(", "); } -var TypeError = util._TypeError; - /** * Constructs a new namespace instance. * @classdesc Reflected namespace and base class of all reflection objects containing nested objects. @@ -2319,7 +2195,7 @@ NamespacePrototype.addJSON = function addJSON(nestedJson) { for (var j = 0; j < nestedTypes.length; ++j) if (nestedTypes[j].testJSON(nested)) return ns.add(nestedTypes[j].fromJSON(nestedName, nested)); - throw TypeError("nested." + nestedName, "JSON for " + nestedError); + throw TypeError("nested." + nestedName + " must be JSON for " + nestedError); }); } return this; @@ -2362,10 +2238,10 @@ NamespacePrototype.add = function add(object) { /* istanbul ignore next */ if (!object || nestedTypes.indexOf(object.constructor) < 0) - throw TypeError("object", nestedError); + throw TypeError("object must be " + nestedError); /* istanbul ignore next */ if (object instanceof Field && object.extend === undefined) - throw TypeError("object", "an extension field when not part of a type"); + throw TypeError("object must be an extension field when not part of a type"); if (!this.nested) this.nested = {}; @@ -2404,7 +2280,7 @@ NamespacePrototype.remove = function remove(object) { /* istanbul ignore next */ if (!(object instanceof ReflectionObject)) - throw TypeError("object", "a ReflectionObject"); + throw TypeError("object must be a ReflectionObject"); /* istanbul ignore next */ if (object.parent !== this || !this.nested) throw Error(object + " is not a member of " + this); @@ -2451,10 +2327,10 @@ NamespacePrototype.define = function define(path, json) { NamespacePrototype.resolve = function resolve() { /* istanbul ignore next */ if (!Type) - Type = require(32); + Type = require(31); /* istanbul ignore next */ if (!Service) - Type = require(30); + Type = require(29); // Add uppercased (and thus conflict-free) nested types, services and enums as properties // of the type just like static code does. This allows using a .d.ts generated for a static @@ -2539,7 +2415,7 @@ NamespacePrototype.lookupType = function lookupType(path) { /* istanbul ignore next */ if (!Type) - Type = require(32); + Type = require(31); var found = this.lookup(path, Type); if (!found) @@ -2558,7 +2434,7 @@ NamespacePrototype.lookupService = function lookupService(path) { /* istanbul ignore next */ if (!Service) - Service = require(30); + Service = require(29); var found = this.lookup(path, Service); if (!found) @@ -2580,19 +2456,17 @@ NamespacePrototype.lookupEnum = function lookupEnum(path) { return found.values; }; -},{"16":16,"17":17,"22":22,"30":30,"32":32,"34":34}],22:[function(require,module,exports){ +},{"15":15,"16":16,"21":21,"29":29,"31":31,"33":33}],21:[function(require,module,exports){ "use strict"; module.exports = ReflectionObject; -var util = require(34); +var util = require(33); ReflectionObject.className = "ReflectionObject"; ReflectionObject.extend = util.extend; var Root; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new reflection object instance. * @classdesc Base class of all reflection objects. @@ -2605,10 +2479,10 @@ function ReflectionObject(name, options) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (options && !util.isObject(options)) - throw TypeError("options", "an object"); + throw TypeError("options must be an object"); /** * Options. @@ -2695,7 +2569,7 @@ ReflectionObjectPrototype.onAdd = function onAdd(parent) { this.resolved = false; var root = parent.root; if (!Root) - Root = require(27); + Root = require(26); if (root instanceof Root) root._handleAdd(this); }; @@ -2708,7 +2582,7 @@ ReflectionObjectPrototype.onAdd = function onAdd(parent) { ReflectionObjectPrototype.onRemove = function onRemove(parent) { var root = parent.root; if (!Root) - Root = require(27); + Root = require(26); if (root instanceof Root) root._handleRemove(this); this.parent = null; @@ -2723,7 +2597,7 @@ ReflectionObjectPrototype.resolve = function resolve() { if (this.resolved) return this; if (!Root) - Root = require(27); + Root = require(26); if (this.root instanceof Root) this.resolved = true; // only if part of a root return this; @@ -2779,20 +2653,17 @@ ReflectionObjectPrototype.toString = function toString() { return className; }; -},{"27":27,"34":34}],23:[function(require,module,exports){ +},{"26":26,"33":33}],22:[function(require,module,exports){ "use strict"; module.exports = OneOf; -var ReflectionObject = require(22); +var ReflectionObject = require(21); /** @alias OneOf.prototype */ var OneOfPrototype = ReflectionObject.extend(OneOf); OneOf.className = "OneOf"; -var Field = require(17), - util = require(34); - -var TypeError = util._TypeError; +var Field = require(16); /** * Constructs a new oneof instance. @@ -2812,13 +2683,7 @@ function OneOf(name, fieldNames, options) { /* istanbul ignore next */ if (fieldNames && !Array.isArray(fieldNames)) - throw TypeError("fieldNames", "an Array"); - - /** - * Upper cased name for getter/setter calls. - * @type {string} - */ - this.ucName = util.ucFirst(this.name); + throw TypeError("fieldNames must be an Array"); /** * Field names that belong to this oneof. @@ -2901,7 +2766,7 @@ OneOfPrototype.add = function add(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); if (field.parent) field.parent.remove(field); @@ -2921,7 +2786,7 @@ OneOfPrototype.remove = function remove(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); var index = this._fieldsArray.indexOf(field); /* istanbul ignore next */ @@ -2967,21 +2832,21 @@ OneOfPrototype.onRemove = function onRemove(parent) { ReflectionObject.prototype.onRemove.call(this, parent); }; -},{"17":17,"22":22,"34":34}],24:[function(require,module,exports){ +},{"16":16,"21":21}],23:[function(require,module,exports){ "use strict"; module.exports = parse; -var tokenize = require(31), - Root = require(27), - Type = require(32), - Field = require(17), - MapField = require(18), - OneOf = require(23), - Enum = require(16), - Service = require(30), - Method = require(20), - types = require(33), - util = require(34); +var tokenize = require(30), + Root = require(26), + Type = require(31), + Field = require(16), + MapField = require(17), + OneOf = require(22), + Enum = require(15), + Service = require(29), + Method = require(19), + types = require(32), + util = require(33); function isName(token) { return /^[a-zA-Z_][a-zA-Z_0-9]*$/.test(token); @@ -3635,7 +3500,7 @@ function parse(source, root, options) { * @variation 2 */ -},{"16":16,"17":17,"18":18,"20":20,"23":23,"27":27,"30":30,"31":31,"32":32,"33":33,"34":34}],25:[function(require,module,exports){ +},{"15":15,"16":16,"17":17,"19":19,"22":22,"26":26,"29":29,"30":30,"31":31,"32":32,"33":33}],24:[function(require,module,exports){ "use strict"; module.exports = Reader; @@ -3687,9 +3552,11 @@ function Reader(buffer) { Reader.create = util.Buffer ? function create_buffer_setup(buffer) { if (!BufferReader) - BufferReader = require(26); + BufferReader = require(25); return (Reader.create = function create_buffer(buffer) { - return new BufferReader(buffer); + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + : new Reader(buffer); })(buffer); } /* istanbul ignore next */ @@ -4151,11 +4018,11 @@ Reader._configure = configure; configure(); -},{"26":26,"37":37}],26:[function(require,module,exports){ +},{"25":25,"37":37}],25:[function(require,module,exports){ "use strict"; module.exports = BufferReader; -var Reader = require(25); +var Reader = require(24); /** @alias BufferReader.prototype */ var BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype); BufferReaderPrototype.constructor = BufferReader; @@ -4184,18 +4051,18 @@ BufferReaderPrototype.string = function read_string_buffer() { return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)); }; -},{"25":25,"37":37}],27:[function(require,module,exports){ +},{"24":24,"37":37}],26:[function(require,module,exports){ "use strict"; module.exports = Root; -var Namespace = require(21); +var Namespace = require(20); /** @alias Root.prototype */ var RootPrototype = Namespace.extend(Root); Root.className = "Root"; -var Field = require(17), - util = require(34); +var Field = require(16), + util = require(33); var parse, // cyclic, might be excluded common; // might be excluded @@ -4252,8 +4119,8 @@ function SYNC() {} // eslint-disable-line no-empty-function var initParser = function() { try { // excluded in noparse builds - parse = require(24); - common = require(11); + parse = require(23); + common = require(10); } catch (e) {} // eslint-disable-line no-empty initParser = null; }; @@ -4502,7 +4369,7 @@ RootPrototype._handleRemove = function handleRemove(object) { } }; -},{"11":11,"17":17,"21":21,"24":24,"34":34}],28:[function(require,module,exports){ +},{"10":10,"16":16,"20":20,"23":23,"33":33}],27:[function(require,module,exports){ "use strict"; /** @@ -4511,13 +4378,13 @@ RootPrototype._handleRemove = function handleRemove(object) { */ var rpc = exports; -rpc.Service = require(29); +rpc.Service = require(28); -},{"29":29}],29:[function(require,module,exports){ +},{"28":28}],28:[function(require,module,exports){ "use strict"; module.exports = Service; -var util = require(34); +var util = require(33); var EventEmitter = util.EventEmitter; /** @@ -4557,11 +4424,11 @@ ServicePrototype.end = function end(endedByRPC) { return this; }; -},{"34":34}],30:[function(require,module,exports){ +},{"33":33}],29:[function(require,module,exports){ "use strict"; module.exports = Service; -var Namespace = require(21); +var Namespace = require(20); /** @alias Namespace.prototype */ var NamespacePrototype = Namespace.prototype; /** @alias Service.prototype */ @@ -4569,9 +4436,9 @@ var ServicePrototype = Namespace.extend(Service); Service.className = "Service"; -var Method = require(20), - util = require(34), - rpc = require(28); +var Method = require(19), + util = require(33), + rpc = require(27); /** * Constructs a new service instance. @@ -4741,7 +4608,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel /* istanbul ignore next */ if (!request) - throw util._TypeError("request", "not null"); + throw TypeError("request must not be null"); method.resolve(); var requestData; @@ -4777,7 +4644,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel return rpcService; }; -},{"20":20,"21":21,"28":28,"34":34}],31:[function(require,module,exports){ +},{"19":19,"20":20,"27":27,"33":33}],30:[function(require,module,exports){ "use strict"; module.exports = tokenize; @@ -4982,11 +4849,11 @@ function tokenize(source) { }; /* eslint-enable callback-return */ } -},{}],32:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ "use strict"; module.exports = Type; -var Namespace = require(21); +var Namespace = require(20); /** @alias Namespace.prototype */ var NamespacePrototype = Namespace.prototype; /** @alias Type.prototype */ @@ -4994,19 +4861,19 @@ var TypePrototype = Namespace.extend(Type); Type.className = "Type"; -var Enum = require(16), - OneOf = require(23), - Field = require(17), - Service = require(30), - Class = require(10), - Message = require(19), - Reader = require(25), +var Enum = require(15), + OneOf = require(22), + Field = require(16), + Service = require(29), + Class = require(9), + Message = require(18), + Reader = require(24), Writer = require(39), - util = require(34), - encoder = require(15), - decoder = require(14), + util = require(33), + encoder = require(14), + decoder = require(13), verifier = require(38), - converter = require(12); + converter = require(11); /** * Constructs a new reflected message type instance. @@ -5160,7 +5027,7 @@ Object.defineProperties(TypePrototype, { }, set: function(ctor) { if (ctor && !(ctor.prototype instanceof Message)) - throw util._TypeError("ctor", "a Message constructor"); + throw TypeError("ctor must be a Message constructor"); if (!ctor.from) ctor.from = Message.from; this._ctor = ctor; @@ -5422,7 +5289,7 @@ TypePrototype.convert = function convert_setup(source, impl, options) { return this.setup().convert(source, impl, options); // overrides this method }; -},{"10":10,"12":12,"14":14,"15":15,"16":16,"17":17,"19":19,"21":21,"23":23,"25":25,"30":30,"34":34,"38":38,"39":39}],33:[function(require,module,exports){ +},{"11":11,"13":13,"14":14,"15":15,"16":16,"18":18,"20":20,"22":22,"24":24,"29":29,"33":33,"38":38,"39":39,"9":9}],32:[function(require,module,exports){ "use strict"; /** @@ -5431,7 +5298,7 @@ TypePrototype.convert = function convert_setup(source, impl, options) { */ var types = exports; -var util = require(34); +var util = require(33); var s = [ "double", // 0 @@ -5616,7 +5483,7 @@ types.packed = bake([ /* bool */ 0 ]); -},{"34":34}],34:[function(require,module,exports){ +},{"33":33}],33:[function(require,module,exports){ "use strict"; /** @@ -5627,10 +5494,10 @@ var util = module.exports = require(37); util.asPromise = require(1); util.codegen = require(35); -util.EventEmitter = require(3); -util.extend = require(4); -util.fetch = require(5); -util.path = require(7); +util.EventEmitter = require(2); +util.extend = require(3); +util.fetch = require(4); +util.path = require(6); /** * Node's fs module if available. @@ -5644,25 +5511,9 @@ util.fs = util.inquire("fs"); * @returns {Array.<*>} Converted array */ util.toArray = function toArray(object) { - if (!object) - return []; - var names = Object.keys(object), - length = names.length; - var array = new Array(length); - for (var i = 0; i < length; ++i) - array[i] = object[names[i]]; - return array; -}; - -/** - * Creates a type error. - * @param {string} name Argument name - * @param {string} [description="a string"] Expected argument descripotion - * @returns {TypeError} Created type error - * @private - */ -util._TypeError = function(name, description) { - return TypeError(name + " must be " + (description || "a string")); + return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) { + return object[key]; + }) : []; }; /** @@ -5692,14 +5543,23 @@ util.safeProp = function safeProp(prop) { }; /** - * Converts the second character of a string to lower case. + * Converts the first character of a string to lower case. * @param {string} str String to convert * @returns {string} Converted string */ -util.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util +util.lcFirst = function lcFirst(str) { return str.charAt(0).toLowerCase() + str.substring(1); }; +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + /** * Creates a new buffer of whatever type supported by the environment. * @param {number} [size=0] Buffer size @@ -5712,7 +5572,138 @@ util.newBuffer = function newBuffer(size) { : new (typeof Uint8Array !== "undefined" ? Uint8Array : Array)(size); }; -},{"1":1,"3":3,"35":35,"37":37,"4":4,"5":5,"7":7}],35:[function(require,module,exports){ +},{"1":1,"2":2,"3":3,"35":35,"37":37,"4":4,"6":6}],34:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + string[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + string[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + string[i++] = b64[t | b >> 6]; + string[i++] = b64[b & 63]; + j = 0; + break; + } + } + if (j) { + string[i++] = b64[t]; + string[i ] = 61; + if (j === 1) + string[i + 1] = 61; + } + return String.fromCharCode.apply(String, string); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],35:[function(require,module,exports){ "use strict"; module.exports = codegen; @@ -6070,10 +6061,10 @@ LongBitsPrototype.length = function length() { var util = exports; util.LongBits = require(36); -util.base64 = require(2); -util.inquire = require(6); -util.utf8 = require(9); -util.pool = require(8); +util.base64 = require(34); +util.inquire = require(5); +util.utf8 = require(8); +util.pool = require(7); /** * Whether running within node or not. @@ -6082,13 +6073,6 @@ util.pool = require(8); */ util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node); -/** - * Whether running within IE8 or not. - * @memberof util - * @type {boolean} - */ -util.isIE8 = false; try { util.isIE8 = eval("!-[1,]"); } catch (e) {} // eslint-disable-line no-eval, no-empty - /** * Node's Buffer class if available. * @type {?function(new: Buffer)} @@ -6195,15 +6179,6 @@ util.longNe = function longNe(val, lo, hi) { return bits.lo !== lo || bits.hi !== hi; }; -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util - return str.charAt(0).toUpperCase() + str.substring(1); -}; - /** * An immuable empty array. * @memberof util @@ -6217,14 +6192,28 @@ util.emptyArray = Object.freeze ? Object.freeze([]) : []; */ util.emptyObject = Object.freeze ? Object.freeze({}) : {}; +/** + * Tests if two arrays are not equal. + * @param {Array.<*>} a Array 1 + * @param {Array.<*>} b Array 2 + * @returns {boolean} `true` if not equal, otherwise `false` + */ +util.arrayNe = function arrayNe(a, b) { + if (a.length === b.length) + for (var i = 0; i < a.length; ++i) + if (a[i] !== b[i]) + return true; + return false; +}; + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"2":2,"36":36,"6":6,"8":8,"9":9}],38:[function(require,module,exports){ +},{"34":34,"36":36,"5":5,"7":7,"8":8}],38:[function(require,module,exports){ "use strict"; module.exports = verifier; -var Enum = require(16), - util = require(34); +var Enum = require(15), + util = require(33); function invalid(field, expected) { return field.fullName.substring(1) + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; @@ -6370,7 +6359,7 @@ function verifier(mtype) { ("return null"); /* eslint-enable no-unexpected-multiline */ } -},{"16":16,"34":34}],39:[function(require,module,exports){ +},{"15":15,"33":33}],39:[function(require,module,exports){ "use strict"; module.exports = Writer; @@ -7071,41 +7060,41 @@ protobuf.roots = {}; // Parser (if not excluded) try { - protobuf.tokenize = require(31); - protobuf.parse = require(24); - protobuf.common = require(11); + protobuf.tokenize = require(30); + protobuf.parse = require(23); + protobuf.common = require(10); } catch (e) {} // eslint-disable-line no-empty // Serialization protobuf.Writer = require(39); protobuf.BufferWriter = require(40); -protobuf.Reader = require(25); -protobuf.BufferReader = require(26); -protobuf.encoder = require(15); -protobuf.decoder = require(14); +protobuf.Reader = require(24); +protobuf.BufferReader = require(25); +protobuf.encoder = require(14); +protobuf.decoder = require(13); protobuf.verifier = require(38); -protobuf.converter = require(12); +protobuf.converter = require(11); // Reflection -protobuf.ReflectionObject = require(22); -protobuf.Namespace = require(21); -protobuf.Root = require(27); -protobuf.Enum = require(16); -protobuf.Type = require(32); -protobuf.Field = require(17); -protobuf.OneOf = require(23); -protobuf.MapField = require(18); -protobuf.Service = require(30); -protobuf.Method = require(20); +protobuf.ReflectionObject = require(21); +protobuf.Namespace = require(20); +protobuf.Root = require(26); +protobuf.Enum = require(15); +protobuf.Type = require(31); +protobuf.Field = require(16); +protobuf.OneOf = require(22); +protobuf.MapField = require(17); +protobuf.Service = require(29); +protobuf.Method = require(19); // Runtime -protobuf.Class = require(10); -protobuf.Message = require(19); +protobuf.Class = require(9); +protobuf.Message = require(18); // Utility -protobuf.types = require(33); -protobuf.rpc = require(28); -protobuf.util = require(34); +protobuf.types = require(32); +protobuf.rpc = require(27); +protobuf.util = require(33); protobuf.configure = configure; /* istanbul ignore next */ @@ -7130,7 +7119,7 @@ if (typeof define === "function" && define.amd) }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"10":10,"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,"38":38,"39":39,"40":40}]},{},[41]) +},{"10":10,"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,"27":27,"29":29,"30":30,"31":31,"32":32,"33":33,"38":38,"39":39,"40":40,"9":9}]},{},[41]) //# sourceMappingURL=protobuf.js.map diff --git a/dist/protobuf.js.map b/dist/protobuf.js.map index eef23d89d..c7363923a 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/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/converter.js","src/converters.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/codegen/index.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;;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;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC1pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5TA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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 = 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(6);\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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(16),\r\n converters = require(13),\r\n util = require(34);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, field.defaultValue);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(37);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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&&%s!==null&&util.longNe(%s,%d,%d))\", ref, 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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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\nObject.defineProperties(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: 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/**\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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\nObject.defineProperties(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() {\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.nestedArray)\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.nestedArray;\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.nestedArray;\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.nestedArray, 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.root.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\nObject.defineProperties(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() {\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: function() {\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.root;\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.root;\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 if (!Root)\r\n Root = require(27);\r\n if (this.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 fullName = this.fullName;\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 enm = new Enum(name);\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.add(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(37);\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 + \" at offset \" + this.pos);\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(37);\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(11);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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(10),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(39),\r\n util = require(34),\r\n encoder = require(15),\r\n decoder = require(14),\r\n verifier = require(38),\r\n converter = require(12);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(37);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(35);\r\nutil.EventEmitter = require(3);\r\nutil.extend = require(4);\r\nutil.fetch = require(5);\r\nutil.path = require(7);\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\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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(37);\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 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 * 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 util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(39);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(37);\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\nprotobuf.converter = require(\"./converter\");\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 +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/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/converter.js","src/converters.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/base64/index.js","src/util/codegen/index.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;;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;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5TA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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\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(5);\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(33);\r\n\r\nvar Type; // cyclic\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(31);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type must be a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor must be 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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(15),\r\n converters = require(12),\r\n util = require(33);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, Array.prototype.slice.call(field.defaultValue));\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(37);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(32),\r\n util = require(33);\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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) gen\r\n (\"if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))\", ref, ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n else if (field.bytes) gen\r\n (\"if(%s&&%s.length\" + (field.defaultValue.length ? \"&&util.arrayNe(%s,%j)\" : \"\") + \")\", ref, ref, ref, Array.prototype.slice.call(field.defaultValue));\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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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(33);\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id must be 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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 must be a string\");\r\n var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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(32),\r\n util = require(33);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\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 must be a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type must be a string\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend must be a string\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule must be a string rule\");\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\nObject.defineProperties(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: 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/**\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(31);\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 } else if (this.bytes && typeof this.defaultValue === \"string\") {\r\n var buf;\r\n if (util.base64.test(this.defaultValue))\r\n util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0);\r\n else\r\n util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0);\r\n this.defaultValue = buf;\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(32),\r\n util = require(33);\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 TypeError(\"keyType must be a string\");\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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(31),\r\n util = require(33);\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType must be a string\");\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(33);\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(31);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(29);\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\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\nObject.defineProperties(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() {\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.nestedArray)\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 + \" must be 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 must be \" + nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object must be 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.nestedArray;\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 must be 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(31);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(29);\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.nestedArray;\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.nestedArray, 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.root.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(31);\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(29);\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(33);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options must be 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\nObject.defineProperties(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() {\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: function() {\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.root;\r\n if (!Root)\r\n Root = require(26);\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.root;\r\n if (!Root)\r\n Root = require(26);\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 if (!Root)\r\n Root = require(26);\r\n if (this.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 fullName = this.fullName;\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\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 must be an Array\");\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 must be 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 must be 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(30),\r\n Root = require(26),\r\n Type = require(31),\r\n Field = require(16),\r\n MapField = require(17),\r\n OneOf = require(22),\r\n Enum = require(15),\r\n Service = require(29),\r\n Method = require(19),\r\n types = require(32),\r\n util = require(33);\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 enm = new Enum(name);\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.add(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(37);\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(25);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(24);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(37);\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(33);\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(23);\r\n common = require(10);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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(28);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(33);\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(33),\r\n rpc = require(27);\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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 TypeError(\"request must not be 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(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(29),\r\n Class = require(9),\r\n Message = require(18),\r\n Reader = require(24),\r\n Writer = require(39),\r\n util = require(33),\r\n encoder = require(14),\r\n decoder = require(13),\r\n verifier = require(38),\r\n converter = require(11);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw TypeError(\"ctor must be 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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(33);\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(37);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(35);\r\nutil.EventEmitter = require(2);\r\nutil.extend = require(3);\r\nutil.fetch = require(4);\r\nutil.path = require(6);\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 return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) {\r\n return object[key];\r\n }) : [];\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 first 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) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\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) {\r\n return str.charAt(0).toUpperCase() + 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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = 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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(37);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n util = require(33);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(39);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(37);\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\nprotobuf.converter = require(\"./converter\");\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 17d0c3b6b..2fb1de9e9 100644 --- a/dist/protobuf.min.js +++ b/dist/protobuf.min.js @@ -1,9 +1,9 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ -!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[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:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.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(e,t,r){for(var n,s=[],o=0,u=0;t>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(e,t,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:t[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:t[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:t[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i}},{}],3:[function(e,t,r){"use strict";function n(){this.a={}}t.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,t){if(void 0===e)this.a={};else if(void 0===t)this.a[e]=[];else for(var r=this.a[e],n=0;n0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],8:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],9:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],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(e,t,r){for(var n,i,s=r,o=0;o>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],10:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(32)),!(t instanceof s))throw a("type","a Type");if(r){if("function"!=typeof r)throw a("ctor","a function")}else r=function(e){return function(t){e.call(this,t)}}(o);r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n>>3){");for(var n=0;n>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,a=e.oneofsArray,f=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):f(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,h,r),f("}")("}")}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,t,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r),f("}")):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,l.defaultValue.low,l.defaultValue.high):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,t,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var t=0;t>>0,h,r),f("break;")}f("}")}return f("return w")}t.exports=i;var s=e(16),o=e(33),u=e(34)},{16:16,33:33,34:34}],16:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(34),u=o.b;n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw u("name");if(!o.isInteger(t)||t<0)throw u("id","a non-negative integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw u("name");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{22:22,34:34}],17:[function(e,t,r){"use strict";function n(e,t,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,e,o),!l.isInteger(t)||t<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=t,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.c=null}t.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,a=e(16),f=e(33),l=e(34),h=l.b;Object.defineProperties(s,{packed:{get:function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.c=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(18)),u.fromJSON(t,r)):new n(t,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 t=f.defaults[this.type];if(void 0===t)if(o||(o=e(32)),this.resolvedType=this.parent.lookup(this.type,o))t=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);t=0}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:(this.options&&void 0!==this.options.default?(this.defaultValue=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.defaultValue&&(this.defaultValue=this.resolvedType.values[this.defaultValue]||0)):this.defaultValue=t,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(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw a.b("keyType");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(33),a=e(34);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.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(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r0;){var n=e.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 t&&r.addJSON(t),r},a.resolve=function(){f||(f=e(32)),l||(f=e(30));for(var t=this.nestedArray,r=0;r-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.h.push(n))}),i(this)},o.onRemove=function(e){this.h.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22,34:34}],24:[function(e,t,r){"use strict";function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,t,r){function w(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+Z.line()+")")}function x(){var e,t=[];do{if('"'!==(e=W())&&"'"!==e)throw w(e);t.push(W()),Q(e),e=G()}while('"'===e||"'"===e);return t.join("")}function k(e){var t=W();switch(o(t)){case"'":case'"':return X(t),x();case"true":return!0;case"false":return!1}try{return A(t)}catch(r){if(e&&i(t))return t;throw w(t,"value")}}function O(){var e=N(W()),t=e;return Q("to",!0)&&(t=N(W())),Q(";"),[e,t]}function A(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw w(e,"number")}function N(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw w(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw w(e,"id")}function S(){if(void 0!==D)throw w("package");if(D=W(),!i(D))throw w(D,"name");re=re.define(D),Q(";")}function j(){var e,t=G();switch(t){case"weak":e=H||(H=[]),W();break;case"public":W();default:e=_||(_=[])}t=x(),Q(";"),e.push(t)}function T(){if(Q("="),K=o(x()),ee="proto3"===K,!ee&&"proto2"!==K)throw w(K,"syntax");Q(";")}function E(e,t){switch(t){case"option":return $(e,t),Q(";"),!0;case"message":return B(e,t),!0;case"enum":return F(e,t),!0;case"service":return M(e,t),!0;case"extend":return U(e,t),!0}return!1}function B(e,t){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(t=W());){var u=o(t);if(!E(s,t))switch(u){case"map":V(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(!ee||!i(t))throw w(t);X(t),J(s,"optional")}}Q(";",!0)}else Q(";");e.add(s)}function J(e,t,r){var s=W();if("group"===o(s))return void q(e,t);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=ne(u),Q("=");var a=N(W()),f=C(new c(u,a,s,t,r));f.repeated&&void 0!==m.packed[s]&&!ee&&f.setOption("packed",!1,!0),e.add(f)}function q(e,t){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=N(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,t);for(Q("{");"}"!==(te=W());)switch(te=o(te)){case"option":$(u,te),Q(";");break;case"required":case"optional":case"repeated":J(u,te);break;default:throw w(te)}Q(";",!0),e.add(u).add(a)}function V(e){Q("<");var t=W();if(void 0===m.mapKey[t])throw w(t,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=ne(s),Q("=");var o=N(W()),u=C(new d(s,o,t,r));e.add(u)}function L(e,t){var r=W();if(!n(r))throw w(r,"name");r=ne(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===t?($(i,t),Q(";")):(X(t),J(i,"optional"));Q(";",!0)}else Q(";");e.add(i)}function F(e,t){var r=W();if(!n(r))throw w(r,"name");var i=new v(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===o(t)?($(i,t),Q(";")):I(i,t);Q(";",!0)}else Q(";");e.add(i)}function I(e,t){if(!n(t))throw w(t,"name");var r=t;Q("=");var i=N(W(),!0);e.add(r,i),C({})}function $(e,t){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",t=G(),s(t)&&(n+=t,W())),Q("="),z(e,n)}function z(e,t){if(Q("{",!0))for(;"}"!==(te=W());){if(!n(te))throw w(te,"name");t=t+"."+te,Q(":",!0)?R(e,t,k(!0)):z(e,t)}else R(e,t,k(!0))}function R(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function C(e){if(Q("[",!0)){do $(e,"option");while(Q(",",!0));Q("]")}return Q(";"),e}function M(e,t){if(t=W(),!n(t))throw w(t,"service name");var r=t,i=new y(r);if(Q("{",!0)){for(;"}"!==(t=W());){var s=o(t);switch(s){case"option":$(i,s),Q(";");break;case"rpc":P(i,s);break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(i)}function P(e,t){var r=t,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(t=W()))throw w(t);if(u=t,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(t=W()))throw w(t);f=t,Q(")");var c=new g(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(t=W());){var d=o(t);switch(d){case"option":$(c,d),Q(";");break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(c)}function U(e,t){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(t=W());){var n=o(t);switch(n){case"required":case"repeated":case"optional":J(e,n,r);break;default:if(!ee||!i(t))throw w(t);X(t),J(e,"optional",r)}}Q(";",!0)}else Q(";")}t instanceof l?r||(r={}):(t=new l,r=t||{});var D,_,H,K,Z=f(e),W=Z.next,X=Z.push,G=Z.peek,Q=Z.skip,Y=!0,ee=!1;t||(t=new l);for(var te,re=t,ne=r.keepCase?function(e){return e}:u;null!==(te=W());){var ie=o(te);switch(ie){case"package":if(!Y)throw w(te);S();break;case"import":if(!Y)throw w(te);j();break;case"syntax":if(!Y)throw w(te);T();break;case"option":if(!Y)throw w(te);$(re,te),Q(";");break;default:if(E(re,te)){Y=!1;continue}throw w(te)}}return a.filename=null,{package:D,imports:_,weakImports:H,syntax:K,root:t}}t.exports=a;var f=e(31),l=e(27),h=e(32),c=e(17),d=e(18),p=e(23),v=e(16),y=e(30),g=e(20),m=e(33),b=e(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(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new x(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}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(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new x(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)}t.exports=i;var b,w=e(37),x=w.LongBits,k=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(26)),(i.create=function(e){return new b(e)})(t)}:function(e){return new i(e)};var O=i.prototype;O.i=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|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 e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+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 e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+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 e=N(this.buf,this.pos);return this.pos+=8,e},O.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.i.call(this.buf,t,r)},O.string=function(){var e=this.bytes();return k.read(e,0,e.length)},O.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.j=m,m()},{26:26,37:37}],26:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(25),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(37);o.Buffer&&(s.i=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{25:25,37:37}],27:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new l(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var a,f,l=e(17),h=e(34);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(24),f=e(11)}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){a.filename=e;var n=a(t,l,r);n.imports&&n.imports.forEach(function(t){u(l.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(l.resolvePath(e,t),!0)})}else l.setOptions(t.options).addJSON(t.nested)}catch(e){return void s(e)}d||p||s(null,l)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in f&&(e=i)}if(!(l.files.indexOf(e)>-1)){if(l.files.push(e),e in f)return void(d?o(e,f[e]):(++p,setTimeout(function(){--p,o(e,f[e])})));if(d){var u;try{u=h.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,h.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(e,l,t);var d=n===i,p=0;return h.isString(t)&&(t=[t]),t.forEach(function(e){u(l.resolvePath("",e))}),d?l:void(p||s(null,l))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.f=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,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 t("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(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.l=null,this.h=null,this.m=null,this.n=null,this.o=null}function i(e){return e.l=e.h=e.n=e.o=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(16),f=e(23),l=e(17),h=e(30),c=e(10),d=e(19),p=e(25),v=e(39),y=e(34),g=e(15),m=e(14),b=e(38),w=e(12);Object.defineProperties(u,{fieldsById:{get:function(){if(this.l)return this.l;this.l={};for(var e=Object.keys(this.fields),t=0;t ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(e){return r[e]}))}for(var l=[],h=[],c=1,d=!1,p=0;p>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,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 e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{37:37}],37:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(36),util.base64=require(2),util.inquire=require(6),util.utf8=require(9),util.pool=require(8),util.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),util.isIE8=!1;try{util.isIE8=eval("!-[1,]")}catch(e){}util.Buffer=function(){try{var e=util.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),util.Array="undefined"==typeof Uint8Array?Array:Uint8Array,util.Long=global.dcodeIO&&global.dcodeIO.Long||util.inquire("long"),util.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},util.isString=function(e){return"string"==typeof e||e instanceof String},util.isObject=function(e){return e&&"object"==typeof e},util.longToHash=function(e){return e?util.LongBits.from(e).toHash():util.LongBits.zeroHash},util.longFromHash=function(e,t){var r=util.LongBits.fromHash(e);return util.Long?util.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},util.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var n=util.LongBits.from(e);return n.lo!==t||n.hi!==r},util.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},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:{})},{2:2,36:36,6:6,8:8,9:9}],38:[function(e,t,r){"use strict";function n(e,t){return e.fullName.substring(1)+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof u){e("switch(%s){",i)("default:")("return%j",n(t,"enum value"));for(var s=a.toArray(t.resolvedType.values),o=0;o127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var h,c=e(37),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=e(40)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(a,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(f,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(f,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(f,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(l,4,e>>>0)},y.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(g,4,e)};var m="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(m,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):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 e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{37:37,40:40}],40:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?a.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(39),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(37),a=u.utf8,f=u.Buffer;n.alloc=function(e){return(n.alloc=f.allocUnsafe)(e)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=f.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(l,t,e),this},o.string=function(e){var t=f.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{37:37,39:39}],41:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.j()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e(31),o.parse=e(24),o.common=e(11)}catch(e){}o.Writer=e(39),o.BufferWriter=e(40),o.Reader=e(25),o.BufferReader=e(26),o.encoder=e(15),o.decoder=e(14),o.verifier=e(38),o.converter=e(12),o.ReflectionObject=e(22),o.Namespace=e(21),o.Root=e(27),o.Enum=e(16),o.Type=e(32),o.Field=e(17),o.OneOf=e(23),o.MapField=e(18),o.Service=e(30),o.Method=e(20),o.Class=e(10),o.Message=e(19),o.types=e(33),o.rpc=e(28),o.util=e(34),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,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,38:38,39:39,40:40}]},{},[41]); +!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[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:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],7:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],8:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],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(e,t,r){for(var n,i,s=r,o=0;o>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],9:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(31)),!(t instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=function(e){return function(t){e.call(this,t)}}(o);r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n>>3){");for(var n=0;n>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,a=e.oneofsArray,f=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):f(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,h,r),f("}")("}")}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,t,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r),f("}")):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,l.defaultValue.low,l.defaultValue.high):l.bytes?f("if(%s&&%s.length"+(l.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(l.defaultValue)):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,t,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var t=0;t>>0,h,r),f("break;")}f("}")}return f("return w")}t.exports=i;var s=e(15),o=e(32),u=e(33)},{15:15,32:32,33:33}],15:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(21),s=i.extend(n);n.className="Enum";var o=e(33);n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{21:21,33:33}],16:[function(e,t,r){"use strict";function n(e,t,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,e,o),!l.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!l.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!l.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,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.b=null}t.exports=n;var i=e(21),s=i.extend(n);n.className="Field";var o,u,a=e(15),f=e(32),l=e(33);Object.defineProperties(s,{packed:{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(17)),u.fromJSON(t,r)):new n(t,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 t=f.defaults[this.type];if(void 0===t)if(o||(o=e(31)),this.resolvedType=this.parent.lookup(this.type,o))t=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);t=0}if(this.map)this.defaultValue={};else if(this.repeated)this.defaultValue=[];else if(this.options&&void 0!==this.options.default?(this.defaultValue=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.defaultValue&&(this.defaultValue=this.resolvedType.values[this.defaultValue]||0)):this.defaultValue=t,this.long)this.defaultValue=l.Long.fromNumber(this.defaultValue,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.defaultValue);else if(this.bytes&&"string"==typeof this.defaultValue){var r;l.base64.test(this.defaultValue)?l.base64.decode(this.defaultValue,r=l.newBuffer(l.base64.length(this.defaultValue)),0):l.utf8.write(this.defaultValue,r=l.newBuffer(l.utf8.length(this.defaultValue)),0),this.defaultValue=r}return i.prototype.resolve.call(this)}},{15:15,17:17,21:21,31:31,32:32,33:33}],17:[function(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(16),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(32),a=e(33);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.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,32:32,33:33}],18:[function(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r0;){var n=e.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 t&&r.addJSON(t),r},a.resolve=function(){f||(f=e(31)),l||(f=e(29));for(var t=this.nestedArray,r=0;r-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{16:16,21:21}],23:[function(e,t,r){"use strict";function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,t,r){function w(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=W())&&"'"!==e)throw w(e);t.push(W()),Q(e),e=G()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=W();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return A(t)}catch(r){if(e&&i(t))return t;throw w(t,"value")}}function O(){var e=N(W()),t=e;return Q("to",!0)&&(t=N(W())),Q(";"),[e,t]}function A(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw w(e,"number")}function N(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw w(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw w(e,"id")}function S(){if(void 0!==D)throw w("package");if(D=W(),!i(D))throw w(D,"name");re=re.define(D),Q(";")}function T(){var e,t=G();switch(t){case"weak":e=H||(H=[]),W();break;case"public":W();default:e=_||(_=[])}t=k(),Q(";"),e.push(t)}function j(){if(Q("="),Z=o(k()),ee="proto3"===Z,!ee&&"proto2"!==Z)throw w(Z,"syntax");Q(";")}function E(e,t){switch(t){case"option":return F(e,t),Q(";"),!0;case"message":return V(e,t),!0;case"enum":return z(e,t),!0;case"service":return M(e,t),!0;case"extend":return U(e,t),!0}return!1}function V(e,t){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(t=W());){var u=o(t);if(!E(s,t))switch(u){case"map":L(s,u);break;case"required":case"optional":case"repeated":B(s,u);break;case"oneof":q(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(!ee||!i(t))throw w(t);X(t),B(s,"optional")}}Q(";",!0)}else Q(";");e.add(s)}function B(e,t,r){var s=W();if("group"===o(s))return void J(e,t);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=ne(u),Q("=");var a=N(W()),f=C(new c(u,a,s,t,r));f.repeated&&void 0!==m.packed[s]&&!ee&&f.setOption("packed",!1,!0),e.add(f)}function J(e,t){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=N(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,t);for(Q("{");"}"!==(te=W());)switch(te=o(te)){case"option":F(u,te),Q(";");break;case"required":case"optional":case"repeated":B(u,te);break;default:throw w(te)}Q(";",!0),e.add(u).add(a)}function L(e){Q("<");var t=W();if(void 0===m.mapKey[t])throw w(t,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=ne(s),Q("=");var o=N(W()),u=C(new d(s,o,t,r));e.add(u)}function q(e,t){var r=W();if(!n(r))throw w(r,"name");r=ne(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===t?(F(i,t),Q(";")):(X(t),B(i,"optional"));Q(";",!0)}else Q(";");e.add(i)}function z(e,t){var r=W();if(!n(r))throw w(r,"name");var i=new v(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===o(t)?(F(i,t),Q(";")):$(i,t);Q(";",!0)}else Q(";");e.add(i)}function $(e,t){if(!n(t))throw w(t,"name");var r=t;Q("=");var i=N(W(),!0);e.add(r,i),C({})}function F(e,t){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",t=G(),s(t)&&(n+=t,W())),Q("="),I(e,n)}function I(e,t){if(Q("{",!0))for(;"}"!==(te=W());){if(!n(te))throw w(te,"name");t=t+"."+te,Q(":",!0)?R(e,t,x(!0)):I(e,t)}else R(e,t,x(!0))}function R(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function C(e){if(Q("[",!0)){do F(e,"option");while(Q(",",!0));Q("]")}return Q(";"),e}function M(e,t){if(t=W(),!n(t))throw w(t,"service name");var r=t,i=new y(r);if(Q("{",!0)){for(;"}"!==(t=W());){var s=o(t);switch(s){case"option":F(i,s),Q(";");break;case"rpc":P(i,s);break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(i)}function P(e,t){var r=t,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(t=W()))throw w(t);if(u=t,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(t=W()))throw w(t);f=t,Q(")");var c=new g(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(t=W());){var d=o(t);switch(d){case"option":F(c,d),Q(";");break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(c)}function U(e,t){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(t=W());){var n=o(t);switch(n){case"required":case"repeated":case"optional":B(e,n,r);break;default:if(!ee||!i(t))throw w(t);X(t),B(e,"optional",r)}}Q(";",!0)}else Q(";")}t instanceof l?r||(r={}):(t=new l,r=t||{});var D,_,H,Z,K=f(e),W=K.next,X=K.push,G=K.peek,Q=K.skip,Y=!0,ee=!1;t||(t=new l);for(var te,re=t,ne=r.keepCase?function(e){return e}:u;null!==(te=W());){var ie=o(te);switch(ie){case"package":if(!Y)throw w(te);S();break;case"import":if(!Y)throw w(te);T();break;case"syntax":if(!Y)throw w(te);j();break;case"option":if(!Y)throw w(te);F(re,te),Q(";");break;default:if(E(re,te)){Y=!1;continue}throw w(te)}}return a.filename=null,{package:D,imports:_,weakImports:H,syntax:Z,root:t}}t.exports=a;var f=e(30),l=e(26),h=e(31),c=e(16),d=e(17),p=e(22),v=e(15),y=e(29),g=e(19),m=e(32),b=e(33)},{15:15,16:16,17:17,19:19,22:22,26:26,29:29,30:30,31:31,32:32,33:33}],24:[function(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new k(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}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(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-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)}t.exports=i;var b,w=e(37),k=w.LongBits,x=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(25)),(i.create=function(e){return w.Buffer.isBuffer(e)?new b(e):new i(e)})(t)}:function(e){return new i(e)};var O=i.prototype;O.h=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|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 e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+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 e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+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 e=N(this.buf,this.pos);return this.pos+=8,e},O.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.h.call(this.buf,t,r)},O.string=function(){var e=this.bytes();return x.read(e,0,e.length)},O.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.i=m,m()},{25:25,37:37}],25:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(24),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(37);o.Buffer&&(s.h=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{24:24,37:37}],26:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new l(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(20),u=o.extend(n);n.className="Root";var a,f,l=e(16),h=e(33);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(23),f=e(10)}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){a.filename=e;var n=a(t,l,r);n.imports&&n.imports.forEach(function(t){u(l.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(l.resolvePath(e,t),!0)})}else l.setOptions(t.options).addJSON(t.nested)}catch(e){return void s(e)}d||p||s(null,l)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in f&&(e=i)}if(!(l.files.indexOf(e)>-1)){if(l.files.push(e),e in f)return void(d?o(e,f[e]):(++p,setTimeout(function(){--p,o(e,f[e])})));if(d){var u;try{u=h.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,h.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(e,l,t);var d=n===i,p=0;return h.isString(t)&&(t=[t]),t.forEach(function(e){u(l.resolvePath("",e))}),d?l:void(p||s(null,l))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,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 t("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},{}],31:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.k=null,this.g=null,this.l=null,this.m=null,this.n=null}function i(e){return e.k=e.g=e.m=e.n=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(15),f=e(22),l=e(16),h=e(29),c=e(9),d=e(18),p=e(24),v=e(39),y=e(33),g=e(14),m=e(13),b=e(38),w=e(11);Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.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(e,t,r){for(var n,s=[],o=0,u=0;t>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(e,t,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:t[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:t[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:t[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],35:[function(e,t,r){"use strict";function n(){function e(){for(var t=[],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(e){return r[e]}))}for(var l=[],h=[],c=1,d=!1,p=0;p>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,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 e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{37:37}],37:[function(e,t,r){(function(t){"use strict";var n=r;n.LongBits=e(36),n.base64=e(34),n.inquire=e(5),n.utf8=e(8),n.pool=e(7),n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node),n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=t.dcodeIO&&t.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var i=n.LongBits.from(e);return i.lo!==t||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(e,t){if(e.length===t.length)for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var h,c=e(37),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=e(40)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(a,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(f,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(f,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(f,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(l,4,e>>>0)},y.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(g,4,e)};var m="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(m,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):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 e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{37:37,40:40}],40:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?a.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(39),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(37),a=u.utf8,f=u.Buffer;n.alloc=function(e){return(n.alloc=f.allocUnsafe)(e)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=f.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(l,t,e),this},o.string=function(e){var t=f.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{37:37,39:39}],41:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.i()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e(30),o.parse=e(23),o.common=e(10)}catch(e){}o.Writer=e(39),o.BufferWriter=e(40),o.Reader=e(24),o.BufferReader=e(25),o.encoder=e(14),o.decoder=e(13),o.verifier=e(38),o.converter=e(11),o.ReflectionObject=e(21),o.Namespace=e(20),o.Root=e(26),o.Enum=e(15),o.Type=e(31),o.Field=e(16),o.OneOf=e(22),o.MapField=e(17),o.Service=e(29),o.Method=e(19),o.Class=e(9),o.Message=e(18),o.types=e(32),o.rpc=e(27),o.util=e(33),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,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,27:27,29:29,30:30,31:31,32:32,33:33,38:38,39:39,40:40,9:9}]},{},[41]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/protobuf.min.js.gz b/dist/protobuf.min.js.gz index 1ad22f6ba..39e76d176 100644 Binary files a/dist/protobuf.min.js.gz and b/dist/protobuf.min.js.gz differ diff --git a/dist/protobuf.min.js.map b/dist/protobuf.min.js.map index e8ee933f2..8231c1f6b 100644 --- a/dist/protobuf.min.js.map +++ b/dist/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/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/converter.js","src/converters.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/codegen/index.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","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","listeners","splice","emit","extend","ctor","keys","Object","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","replace","isAbsolute","test","normalize","parts","split","absolute","prefix","shift","join","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","fieldsArray","forEach","field","name","isArray","defaultValue","emptyArray","isObject","long","emptyObject","oneofsArray","oneof","defineProperty","get","indexOf","set","value","_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","genConvert","fieldIndex","prop","resolvedType","Enum","sprintf","converter","mtype","gen","codegen","convert","safeProp","repeated","converters","typeOrCtor","options","fieldsOnly","enums","defaults","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","Buffer","isBuffer","message","fromString","newBuffer","decoder","group","ref","map","resolvedKeyType","types","basic","packed","genEncodeType","encoder","wireType","mapKey","partOf","required","oneofFields","ReflectionObject","valuesById","self","key","val","parseInt","EnumPrototype","className","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","toLowerCase","optional","extensionField","declaringField","_packed","FieldPrototype","MapField","defineProperties","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","source","impl","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","_nestedArray","_clearProperties","clearCache","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","getEnum","prev","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","root","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucName","ucFirst","_fieldsArray","addFieldsToParent","OneOfPrototype","index","fieldName","isName","token","isTypeRef","isFqTypeRef","lower","camelCase","str","substring","$0","$1","toUpperCase","parse","illegal","filename","tn","line","readString","next","skip","peek","readValue","acceptTypeRef","parseNumber","readRange","parseId","sign","tokenLower","Infinity","NaN","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","enm","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","JSON","parsed","sync","queued","weak","idx","lastIndexOf","altname","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","methodsArray","methodName","inherited","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","Writer","verifier","fieldsById","names","repeatedFieldsArray","filter","oneOfName","setup","fld","eof","fork","ldelim","bake","description","dst","src","allocUnsafe","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","scope","verbose","console","log","Function","concat","format","arg","stringify","supported","LongBitsPrototype","zero","zzEncode","zeroHash","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","isIE8","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","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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AEA/R","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 = 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(6);\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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(16),\r\n converters = require(13),\r\n util = require(34);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, field.defaultValue);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(37);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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&&%s!==null&&util.longNe(%s,%d,%d))\", ref, 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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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\nObject.defineProperties(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: 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/**\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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\nObject.defineProperties(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() {\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.nestedArray)\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.nestedArray;\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.nestedArray;\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.nestedArray, 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.root.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\nObject.defineProperties(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() {\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: function() {\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.root;\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.root;\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 if (!Root)\r\n Root = require(27);\r\n if (this.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 fullName = this.fullName;\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 enm = new Enum(name);\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.add(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(37);\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 + \" at offset \" + this.pos);\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(37);\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(11);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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(10),\r\n Message = require(19),\r\n Reader = require(25),\r\n Writer = require(39),\r\n util = require(34),\r\n encoder = require(15),\r\n decoder = require(14),\r\n verifier = require(38),\r\n converter = require(12);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(37);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(35);\r\nutil.EventEmitter = require(3);\r\nutil.extend = require(4);\r\nutil.fetch = require(5);\r\nutil.path = require(7);\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\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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(37);\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 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 * 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 util = require(34);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(39);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(37);\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\nprotobuf.converter = require(\"./converter\");\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 +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@protobufjs/aspromise/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/converter.js","src/converters.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/base64/index.js","src/util/codegen/index.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","EventEmitter","_listeners","EventEmitterPrototype","prototype","on","evt","off","undefined","listeners","splice","emit","extend","ctor","keys","Object","create","constructor","fetch","path","callback","fs","readFile","contents","XMLHttpRequest","fetch_xhr","xhr","onreadystatechange","readyState","status","responseText","open","send","inquire","moduleName","mod","eval","replace","isAbsolute","test","normalize","parts","split","absolute","prefix","shift","join","originPath","includePath","alreadyNormalized","pool","alloc","slice","size","SIZE","MAX","slab","offset","buf","utf8","string","len","c","charCodeAt","read","buffer","start","end","chunk","String","fromCharCode","write","c1","c2","Class","type","Type","TypeError","MessageCtor","properties","Message","util","merge","$type","fieldsArray","forEach","field","name","Array","isArray","defaultValue","emptyArray","isObject","long","emptyObject","oneofsArray","oneof","defineProperty","get","indexOf","set","value","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","genConvert","fieldIndex","prop","resolvedType","Enum","sprintf","charAt","converter","mtype","gen","codegen","convert","safeProp","repeated","converters","typeOrCtor","options","fieldsOnly","enums","defaults","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","Long","fromNumber","toString","fromValue","bytes","base64","encode","Buffer","isBuffer","message","fromString","newBuffer","decode","decoder","group","ref","map","resolvedKeyType","types","basic","packed","genEncodeType","encoder","wireType","mapKey","partOf","required","oneofFields","j","ReflectionObject","valuesById","self","key","val","parseInt","EnumPrototype","className","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","toLowerCase","optional","extensionField","declaringField","_packed","FieldPrototype","MapField","defineProperties","getOption","setOption","ifNotSet","resolved","typeDefault","parent","lookup","freeze","MapFieldPrototype","MessagePrototype","asJSON","object","writer","encodeDelimited","readerOrBuffer","decodeDelimited","verify","source","impl","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","initNested","Service","nestedTypes","Namespace","nestedError","_nestedArray","_clearProperties","clearCache","namespace","arrayToJSON","array","obj","NamespacePrototype","nestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","getEnum","prev","setOptions","onAdd","onRemove","define","ptr","part","resolveAll","filterType","parentAlreadyChecked","root","found","lookupType","lookupService","lookupEnum","Root","ReflectionObjectPrototype","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","_fieldsArray","addFieldsToParent","OneOfPrototype","index","fieldName","isName","token","isTypeRef","isFqTypeRef","lower","camelCase","str","substring","$0","$1","toUpperCase","parse","illegal","filename","tn","line","readString","next","skip","peek","readValue","acceptTypeRef","parseNumber","readRange","parseId","sign","tokenLower","Infinity","NaN","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","ucFirst","valueType","enm","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","Math","pow","float","readDouble","Float64Array","f64","double","skipType","_configure","BufferReaderPrototype","utf8Slice","min","deferred","files","SYNC","handleExtension","extendedType","sisterField","RootPrototype","resolvePath","initParser","load","finish","cb","process","JSON","parsed","sync","queued","weak","idx","lastIndexOf","altname","setTimeout","readFileSync","loadSync","newDeferred","rpc","rpcImpl","$rpc","ServicePrototype","endedByRPC","_methodsArray","methodsArray","methodName","inherited","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","Writer","verifier","fieldsById","names","repeatedFieldsArray","filter","oneOfName","setup","fld","eof","fork","ldelim","bake","dst","src","allocUnsafe","p","ceil","b64","s64","b","invalidEncoding","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","scope","verbose","console","log","Function","concat","format","arg","stringify","supported","LongBitsPrototype","zero","zzEncode","zeroHash","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","utf8Write","encoding","dcodeIO","isFinite","floor","longToHash","longFromHash","fromBits","arrayNe","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,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCAA,YAWA,SAAAK,GAAAC,EAAAC,GAEA,IAAA,GADAC,MACAb,EAAA,EAAAA,EAAAc,UAAAP,QACAM,EAAAE,KAAAD,UAAAd,KACA,IAAAgB,IAAA,CACA,OAAA,IAAAC,SAAA,SAAAC,EAAAC,GACAN,E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B,EAAA,IACAkI,EAAAod,aAAAtlB,EAAA,IACAkI,EAAAgR,OAAAlZ,EAAA,IACAkI,EAAA0S,aAAA5a,EAAA,IACAkI,EAAAyF,QAAA3N,EAAA,IACAkI,EAAAgF,QAAAlN,EAAA,IACAkI,EAAAyY,SAAA3gB,EAAA,IACAkI,EAAA2C,UAAA7K,EAAA,IAGAkI,EAAAgG,iBAAAlO,EAAA,IACAkI,EAAAuJ,UAAAzR,EAAA,IACAkI,EAAAwL,KAAA1T,EAAA,IACAkI,EAAAwC,KAAA1K,EAAA,IACAkI,EAAA9B,KAAApG,EAAA,IACAkI,EAAAgH,MAAAlP,EAAA,IACAkI,EAAA8L,MAAAhU,EAAA,IACAkI,EAAAuH,SAAAzP,EAAA,IACAkI,EAAAqJ,QAAAvR,EAAA,IACAkI,EAAA4I,OAAA9Q,EAAA,IAGAkI,EAAAhC,MAAAlG,EAAA,GACAkI,EAAA1B,QAAAxG,EAAA,IAGAkI,EAAAqF,MAAAvN,EAAA,IACAkI,EAAAgW,IAAAle,EAAA,IACAkI,EAAAzB,KAAAzG,EAAA,IACAkI,EAAAmS,UAAAA,EAaA,kBAAAtH,SAAAA,OAAAsT,KACAtT,QAAA,QAAA,SAAA1G,GAKA,MAJAA,KACAnE,EAAAzB,KAAA4F,KAAAA,EACAgO,KAEAnS","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\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(5);\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(33);\r\n\r\nvar Type; // cyclic\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(31);\r\n\r\n /* istanbul ignore next */\r\n if (!(type instanceof Type))\r\n throw TypeError(\"type must be a Type\");\r\n\r\n if (ctor) {\r\n /* istanbul ignore next */\r\n if (typeof ctor !== \"function\")\r\n throw TypeError(\"ctor must be 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.fieldsArray.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.oneofsArray.forEach(function(oneof) {\r\n Object.defineProperty(prototype, oneof.resolve().name, {\r\n get: function() {\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(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 });\r\n });\r\n\r\n // Register\r\n type.ctor = 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 = converter;\r\n\r\nvar Enum = require(15),\r\n converters = require(12),\r\n util = require(33);\r\n\r\nvar sprintf = util.codegen.sprintf;\r\n\r\nfunction genConvert(field, fieldIndex, prop) {\r\n if (field.resolvedType)\r\n return field.resolvedType instanceof Enum\r\n ? sprintf(\"f.enums(s%s,%d,types[%d].values,o)\", prop, 0, fieldIndex)\r\n : sprintf(\"types[%d].convert(s%s,f,o)\", fieldIndex, prop);\r\n switch (field.type) {\r\n case \"int64\":\r\n case \"uint64\":\r\n case \"sint64\":\r\n case \"fixed64\":\r\n case \"sfixed64\":\r\n return sprintf(\"f.longs(s%s,%d,%d,%j,o)\", prop, 0, 0, field.type.charAt(0) === \"u\");\r\n case \"bytes\":\r\n return sprintf(\"f.bytes(s%s,%j,o)\", prop, Array.prototype.slice.call(field.defaultValue));\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Generates a conveter specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @param {function} generateField Field generator\r\n * @returns {Codegen} Codegen instance\r\n * @property {ConverterImpl} json Converter implementation producing JSON\r\n * @property {ConverterImpl} message Converter implementation producing runtime messages\r\n */\r\nfunction converter(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.fieldsArray;\r\n var gen = util.codegen(\"s\", \"f\", \"o\")\r\n (\"if(!o)\")\r\n (\"o={}\")\r\n (\"var d=f.create(s,this,o)\");\r\n if (fields.length) { gen\r\n (\"if(d){\");\r\n var convert;\r\n fields.forEach(function(field, i) {\r\n var prop = util.safeProp(field.resolve().name);\r\n if (field.repeated) { gen\r\n (\"if(s%s&&s%s.length){\", prop, prop)\r\n (\"d%s=[]\", prop)\r\n (\"for(var i=0;i} [options] Conversion options\r\n * @returns {Message|Object} Destination object or message\r\n */\r\n\r\n/**\r\n * A function for converting enum values.\r\n * @typedef ConverterEnums\r\n * @type {function}\r\n * @param {number|string} value Actual value\r\n * @param {number} defaultValue Default value\r\n * @param {Object.} values Possible values\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting long values.\r\n * @typedef ConverterLongs\r\n * @type {function}\r\n * @param {number|string|Long} value Actual value\r\n * @param {Long} defaultValue Default value\r\n * @param {boolean} unsigned Whether unsigned or not\r\n * @param {Object.} [options] Conversion options\r\n * @returns {number|string|Long} Converted value\r\n */\r\n\r\n/**\r\n * A function for converting bytes values.\r\n * @typedef ConverterBytes\r\n * @type {function}\r\n * @param {string|number[]|Uint8Array} value Actual value\r\n * @param {number[]} defaultValue Default value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {string|number[]|Uint8Array} Converted value \r\n */\r\n","\"use strict\";\r\nvar converters = exports;\r\n\r\nvar util = require(37);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = decoder;\r\n\r\nvar Enum = require(15),\r\n types = require(32),\r\n util = require(33);\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.fieldsArray;\r\n var gen = util.codegen(\"r\", \"l\")\r\n (\"if(!(r instanceof Reader))\")\r\n (\"r=Reader.create(r)\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)\")\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 (\"if(!(%s&&%s.length))\", ref, ref)\r\n (\"%s=[]\", 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 c2=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.fieldsArray;\r\n var oneofs = mtype.oneofsArray;\r\n var gen = util.codegen(\"m\", \"w\")\r\n (\"if(!w)\")\r\n (\"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().ldelim()\", i, ref); // can't be groups\r\n else gen\r\n (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\r\n gen\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 gen\r\n (\"}\");\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) gen\r\n (\"if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))\", ref, ref, ref, field.defaultValue.low, field.defaultValue.high);\r\n else if (field.bytes) gen\r\n (\"if(%s&&%s.length\" + (field.defaultValue.length ? \"&&util.arrayNe(%s,%j)\" : \"\") + \")\", ref, ref, ref, Array.prototype.slice.call(field.defaultValue));\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\" + util.safeProp(oneof.name));\r\n var oneofFields = oneof.fieldsArray;\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(33);\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 id.\r\n * @type {Object.}\r\n */\r\n this.valuesById = {};\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = Object.create(this.valuesById); // toJSON, marker\r\n\r\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\r\n // compatible enum. This is used by pbts to write actual enum definitions that work for\r\n // static and reflection code alike instead of emitting generic object definitions.\r\n\r\n var self = this;\r\n Object.keys(values || {}).forEach(function(key) {\r\n var val;\r\n if (typeof values[key] === \"number\")\r\n val = values[key];\r\n else {\r\n val = parseInt(key, 10);\r\n key = values[key];\r\n }\r\n self.valuesById[self.values[key] = val] = key;\r\n });\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isInteger(id) || id < 0)\r\n throw TypeError(\"id must be 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.valuesById[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n\r\n this.valuesById[this.values[name] = id] = name;\r\n return 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 must be a string\");\r\n var val = this.values[name];\r\n if (val === undefined)\r\n throw Error(\"'\" + name + \"' is not a name of \" + this);\r\n delete this.valuesById[val];\r\n delete this.values[name];\r\n return 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(32),\r\n util = require(33);\r\n\r\nvar Type, // cyclic\r\n MapField; // cyclic\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 must be a non-negative integer\");\r\n /* istanbul ignore next */\r\n if (!util.isString(type))\r\n throw TypeError(\"type must be a string\");\r\n /* istanbul ignore next */\r\n if (extend !== undefined && !util.isString(extend))\r\n throw TypeError(\"extend must be a string\");\r\n /* istanbul ignore next */\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw TypeError(\"rule must be a string rule\");\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\nObject.defineProperties(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: 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/**\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(31);\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 if (this.resolvedType instanceof Enum && typeof this.defaultValue === \"string\")\r\n this.defaultValue = this.resolvedType.values[this.defaultValue] || 0;\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 } else if (this.bytes && typeof this.defaultValue === \"string\") {\r\n var buf;\r\n if (util.base64.test(this.defaultValue))\r\n util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0);\r\n else\r\n util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0);\r\n this.defaultValue = buf;\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(32),\r\n util = require(33);\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 TypeError(\"keyType must be a string\");\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 converters = 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 this.$type.convert(this, converters.json, options);\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 this.$type.convert(object, converters.message, options);\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\r\n/**\r\n * Converts an object or runtime message of this type.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nMessage.convert = function convert(source, impl, options) {\r\n return this.$type.convert(source, impl, options);\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(31),\r\n util = require(33);\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(requestType))\r\n throw TypeError(\"requestType must be a string\");\r\n /* istanbul ignore next */\r\n if (!util.isString(responseType))\r\n throw TypeError(\"responseType must be a string\");\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(33);\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(31);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Service = require(29);\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\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\nObject.defineProperties(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() {\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.nestedArray)\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 + \" must be 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 must be \" + nestedError);\r\n /* istanbul ignore next */\r\n if (object instanceof Field && object.extend === undefined)\r\n throw TypeError(\"object must be 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.nestedArray;\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 must be 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(31);\r\n /* istanbul ignore next */\r\n if (!Service)\r\n Type = require(29);\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.nestedArray;\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.nestedArray, 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.root.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(31);\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(29);\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(33);\r\n\r\nReflectionObject.className = \"ReflectionObject\";\r\nReflectionObject.extend = util.extend;\r\n\r\nvar Root; // cyclic\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 must be a string\");\r\n /* istanbul ignore next */\r\n if (options && !util.isObject(options))\r\n throw TypeError(\"options must be 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\nObject.defineProperties(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() {\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: function() {\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.root;\r\n if (!Root)\r\n Root = require(26);\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.root;\r\n if (!Root)\r\n Root = require(26);\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 if (!Root)\r\n Root = require(26);\r\n if (this.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 fullName = this.fullName;\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\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 must be an Array\");\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\nObject.defineProperty(OneOfPrototype, \"fieldsArray\", {\r\n get: function() {\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 must be 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 must be 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(30),\r\n Root = require(26),\r\n Type = require(31),\r\n Field = require(16),\r\n MapField = require(17),\r\n OneOf = require(22),\r\n Enum = require(15),\r\n Service = require(29),\r\n Method = require(19),\r\n types = require(32),\r\n util = require(33);\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 enm = new Enum(name);\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.add(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(37);\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(25);\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(24);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(37);\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(33);\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(23);\r\n common = require(10);\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 * @override\r\n */\r\nRootPrototype.resolveAll = function resolveAll() {\r\n if (this.deferred.length)\r\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\r\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\r\n }).join(\", \"));\r\n return Namespace.prototype.resolveAll.call(this);\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.fullName, 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.nestedArray;\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.nestedArray;\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(28);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(33);\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(33),\r\n rpc = require(27);\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\nObject.defineProperties(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() {\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.methodsArray) || {},\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.methodsArray;\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.methodsArray.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 TypeError(\"request must not be 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(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(29),\r\n Class = require(9),\r\n Message = require(18),\r\n Reader = require(24),\r\n Writer = require(39),\r\n util = require(33),\r\n encoder = require(14),\r\n decoder = require(13),\r\n verifier = require(38),\r\n converter = require(11);\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\nObject.defineProperties(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() {\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() {\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() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.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() {\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() {\r\n return this._ctor || (this._ctor = Class.create(this).constructor);\r\n },\r\n set: function(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Message))\r\n throw TypeError(\"ctor must be 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.oneofsArray),\r\n fields : Namespace.arrayToJSON(this.fieldsArray.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.fieldsArray, i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.oneofsArray; 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.fieldsById[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.ctor(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 this.convert(object, converter.message, options);\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 var fullName = this.fullName,\r\n types = this.fieldsArray.map(function(fld) { return fld.resolve().resolvedType; });\r\n this.encode = encoder(this).eof(fullName + \"$encode\", {\r\n Writer : Writer,\r\n types : types,\r\n util : util\r\n });\r\n this.decode = decoder(this).eof(fullName + \"$decode\", {\r\n Reader : Reader,\r\n types : types,\r\n util : util\r\n });\r\n this.verify = verifier(this).eof(fullName + \"$verify\", {\r\n types : types,\r\n util : util\r\n });\r\n this.convert = converter(this).eof(fullName + \"$convert\", {\r\n types : types,\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\r\n/**\r\n * Converts an object or runtime message.\r\n * @param {Message|Object} source Source object or runtime message\r\n * @param {ConverterImpl} impl Converter implementation to use, i.e. {@link converters.json} or {@link converters.message}\r\n * @param {Object.} [options] Conversion options\r\n * @returns {Message|Object} Converted object or runtime message\r\n */\r\nTypePrototype.convert = function convert_setup(source, impl, options) {\r\n return this.setup().convert(source, impl, options); // 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(33);\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(37);\r\n\r\nutil.asPromise = require(1);\r\nutil.codegen = require(35);\r\nutil.EventEmitter = require(2);\r\nutil.extend = require(3);\r\nutil.fetch = require(4);\r\nutil.path = require(6);\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 return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) {\r\n return object[key];\r\n }) : [];\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 first 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) {\r\n return str.charAt(0).toLowerCase() + str.substring(1);\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) {\r\n return str.charAt(0).toUpperCase() + 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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = 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 * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\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.sprintf = sprintf;\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\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(37);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = verifier;\r\n\r\nvar Enum = require(15),\r\n util = require(33);\r\n\r\nfunction invalid(field, expected) {\r\n return field.fullName.substring(1) + \": \" + 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 gen\r\n (\"var e;\")\r\n (\"if(e=types[%d].verify(%s))\", fieldIndex, ref)\r\n (\"return e\");\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.fieldsArray;\r\n if (!fields.length)\r\n return util.codegen()(\"return null\");\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(39);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(37);\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\nprotobuf.converter = require(\"./converter\");\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 815fc0293..27bc49188 100644 --- a/dist/runtime/protobuf.js +++ b/dist/runtime/protobuf.js @@ -1,133 +1,11 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ (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) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - string[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - string[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - string[i++] = b64[t | b >> 6]; - string[i++] = b64[b & 63]; - j = 0; - break; - } - } - if (j) { - string[i++] = b64[t]; - string[i ] = 61; - if (j === 1) - string[i + 1] = 61; - } - return String.fromCharCode.apply(String, string); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -},{}],2:[function(require,module,exports){ -"use strict"; module.exports = inquire; /** @@ -145,7 +23,7 @@ function inquire(moduleName) { return null; } -},{}],3:[function(require,module,exports){ +},{}],2:[function(require,module,exports){ "use strict"; module.exports = pool; @@ -195,7 +73,7 @@ function pool(alloc, slice, size) { }; } -},{}],4:[function(require,module,exports){ +},{}],3:[function(require,module,exports){ "use strict"; /** @@ -302,7 +180,7 @@ utf8.write = function(string, buffer, offset) { return offset - start; }; -},{}],5:[function(require,module,exports){ +},{}],4:[function(require,module,exports){ (function (global){ // This file exports just the bare minimum required to work with statically generated code. // Can be used as a drop-in replacement for the full library as it has the same general structure. @@ -311,9 +189,9 @@ var protobuf = global.protobuf = exports; protobuf.Writer = require(11); protobuf.BufferWriter = require(12); -protobuf.Reader = require(7); -protobuf.BufferReader = require(8); -protobuf.converters = require(6); +protobuf.Reader = require(6); +protobuf.BufferReader = require(7); +protobuf.converters = require(5); protobuf.util = require(10); protobuf.roots = {}; protobuf.configure = configure; @@ -334,7 +212,7 @@ if (typeof define === "function" && define.amd) }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"10":10,"11":11,"12":12,"6":6,"7":7,"8":8}],6:[function(require,module,exports){ +},{"10":10,"11":11,"12":12,"5":5,"6":6,"7":7}],5:[function(require,module,exports){ "use strict"; var converters = exports; @@ -467,7 +345,7 @@ converters.message = { } }; -},{"10":10}],7:[function(require,module,exports){ +},{"10":10}],6:[function(require,module,exports){ "use strict"; module.exports = Reader; @@ -519,9 +397,11 @@ function Reader(buffer) { Reader.create = util.Buffer ? function create_buffer_setup(buffer) { if (!BufferReader) - BufferReader = require(8); + BufferReader = require(7); return (Reader.create = function create_buffer(buffer) { - return new BufferReader(buffer); + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + : new Reader(buffer); })(buffer); } /* istanbul ignore next */ @@ -983,11 +863,11 @@ Reader._configure = configure; configure(); -},{"10":10,"8":8}],8:[function(require,module,exports){ +},{"10":10,"7":7}],7:[function(require,module,exports){ "use strict"; module.exports = BufferReader; -var Reader = require(7); +var Reader = require(6); /** @alias BufferReader.prototype */ var BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype); BufferReaderPrototype.constructor = BufferReader; @@ -1016,7 +896,138 @@ BufferReaderPrototype.string = function read_string_buffer() { return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)); }; -},{"10":10,"7":7}],9:[function(require,module,exports){ +},{"10":10,"6":6}],8:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4); + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + string[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + string[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + string[i++] = b64[t | b >> 6]; + string[i++] = b64[b & 63]; + j = 0; + break; + } + } + if (j) { + string[i++] = b64[t]; + string[i ] = 61; + if (j === 1) + string[i + 1] = 61; + } + return String.fromCharCode.apply(String, string); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],9:[function(require,module,exports){ "use strict"; module.exports = LongBits; @@ -1235,10 +1246,10 @@ LongBitsPrototype.length = function length() { var util = exports; util.LongBits = require(9); -util.base64 = require(1); -util.inquire = require(2); -util.utf8 = require(4); -util.pool = require(3); +util.base64 = require(8); +util.inquire = require(1); +util.utf8 = require(3); +util.pool = require(2); /** * Whether running within node or not. @@ -1247,13 +1258,6 @@ util.pool = require(3); */ util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node); -/** - * Whether running within IE8 or not. - * @memberof util - * @type {boolean} - */ -util.isIE8 = false; try { util.isIE8 = eval("!-[1,]"); } catch (e) {} // eslint-disable-line no-eval, no-empty - /** * Node's Buffer class if available. * @type {?function(new: Buffer)} @@ -1360,15 +1364,6 @@ util.longNe = function longNe(val, lo, hi) { return bits.lo !== lo || bits.hi !== hi; }; -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util - return str.charAt(0).toUpperCase() + str.substring(1); -}; - /** * An immuable empty array. * @memberof util @@ -1382,9 +1377,23 @@ util.emptyArray = Object.freeze ? Object.freeze([]) : []; */ util.emptyObject = Object.freeze ? Object.freeze({}) : {}; +/** + * Tests if two arrays are not equal. + * @param {Array.<*>} a Array 1 + * @param {Array.<*>} b Array 2 + * @returns {boolean} `true` if not equal, otherwise `false` + */ +util.arrayNe = function arrayNe(a, b) { + if (a.length === b.length) + for (var i = 0; i < a.length; ++i) + if (a[i] !== b[i]) + return true; + return false; +}; + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"1":1,"2":2,"3":3,"4":4,"9":9}],11:[function(require,module,exports){ +},{"1":1,"2":2,"3":3,"8":8,"9":9}],11:[function(require,module,exports){ "use strict"; module.exports = Writer; @@ -2004,7 +2013,7 @@ BufferWriterPrototype.string = function write_string_buffer(value) { return this; }; -},{"10":10,"11":11}]},{},[5]) +},{"10":10,"11":11}]},{},[4]) //# sourceMappingURL=protobuf.js.map diff --git a/dist/runtime/protobuf.js.map b/dist/runtime/protobuf.js.map index 5e2da9a1c..a0524ade3 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/converters.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;AACA;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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.converters = require(\"../src/converters\");\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\nvar converters = exports;\r\n\r\nvar util = require(10);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(10);\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(8);\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 + \" at offset \" + this.pos);\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(7);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(10);\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(10);\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 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 * 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(10);\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(12);\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(11);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(10);\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/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/converters.js","src/reader.js","src/reader_buffer.js","src/util/base64/index.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;;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;AACA;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;\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.converters = require(\"../src/converters\");\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\nvar converters = exports;\r\n\r\nvar util = require(10);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(10);\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 util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(10);\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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(10);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(10);\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(12);\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(11);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(10);\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 1f990759b..91e1719c5 100644 --- a/dist/runtime/protobuf.min.js +++ b/dist/runtime/protobuf.min.js @@ -1,8 +1,8 @@ /*! * protobuf.js v6.4.0 (c) 2016, Daniel Wirtz - * Compiled Mon, 02 Jan 2017 13:12:40 UTC + * Compiled Mon, 02 Jan 2017 15:34:48 UTC * Licensed under the BSD-3-Clause License * see: https://github.com/dcodeIO/protobuf.js for details */ -!function t(n,i,r){function e(s,u){if(!i[s]){if(!n[s]){var f="function"==typeof require&&require;if(!u&&f)return f(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=i[s]={exports:{}};n[s][0].call(l.exports,function(t){var i=n[s][1][t];return e(i?i:t)},l,l.exports,t,n,i,r)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s1&&"="===t.charAt(n);)++i;return Math.ceil(3*t.length)/4-i};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,n,i){for(var r,o=[],s=0,u=0;n>2],r=(3&f)<<4,u=1;break;case 1:o[s++]=e[r|f>>4],r=(15&f)<<2,u=2;break;case 2:o[s++]=e[r|f>>6],o[s++]=e[63&f],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,n,i){for(var r,e=i,s=0,f=0;f1)break;if(void 0===(h=o[h]))throw Error(u);switch(s){case 0:r=h,s=1;break;case 1:n[i++]=r<<2|(48&h)>>4,r=h,s=2;break;case 2:n[i++]=(15&r)<<4|(60&h)>>2,r=h,s=3;break;case 3:n[i++]=(3&r)<<6|h,s=0}}if(1===s)throw Error(u);return i-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,n,i){"use strict";function r(t,n,i){var r=i||8192,e=r>>>1,o=null,s=r;return function(i){if(i<1||i>e)return t(i);s+i>r&&(o=t(r),s=0);var u=n.call(o,s,s+=i);return 7&s&&(s=(7|s)+1),u}}n.exports=r},{}],4:[function(t,n,i){"use strict";var r=i;r.length=function(t){for(var n=0,i=0,r=0;r191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],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,n,i){for(var r,e,o=i,s=0;s>6|192,n[i++]=63&r|128):55296===(64512&r)&&56320===(64512&(e=t.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&e),++s,n[i++]=r>>18|240,n[i++]=r>>12&63|128,n[i++]=r>>6&63|128,n[i++]=63&r|128):(n[i++]=r>>12|224,n[i++]=r>>6&63|128,n[i++]=63&r|128);return i-o}},{}],5:[function(t,n,i){(function(n){"use strict";function r(){e.Reader.a()}var e=n.protobuf=i;e.Writer=t(11),e.BufferWriter=t(12),e.Reader=t(7),e.BufferReader=t(8),e.converters=t(6),e.util=t(10),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,12:12,6:6,7:7,8:8}],6:[function(t,n,i){"use strict";var r=i,e=t(10);r.json={create:function(t,n,i){return t?i.fieldsOnly?{}:e.merge({},t):null},enums:function(t,n,i,r){if(r.defaults)void 0===t&&(t=n);else if(void 0===t||t===n)return;return r.enums===String&&"number"==typeof t?i[t]:t},longs:function(t,n,i,r,o){if(t){if(!e.longNe(t,n,i)&&!o.defaults)return}else{if(!o.defaults)return;t={low:n,high:i}}return o.longs===Number?"number"==typeof t?t:e.LongBits.from(t).toNumber(r):o.longs===String?"number"==typeof t?e.Long.fromNumber(t,r).toString():(t=e.Long.fromValue(t),t.unsigned=r,t.toString()):t},bytes:function(t,n,i){if(t){if(!t.length&&!i.defaults)return}else{if(!i.defaults)return;t=n}return i.bytes===String?e.base64.encode(t,0,t.length):i.bytes===Array?Array.prototype.slice.call(t):i.bytes!==e.Buffer||e.Buffer.isBuffer(t)?t:e.Buffer.from(t)}},r.message={create:function(t,n,i){return t?new(n.ctor?n.ctor:n)(i.fieldsOnly?void 0:t):null},enums:function(t,n,i){return"string"==typeof t?i[t]:0|t},longs:function(t,n,i,r){return"string"==typeof t?e.Long.fromString(t,r):"number"==typeof t?e.Long.fromNumber(t,r):t},bytes:function(t){if(e.Buffer)return e.Buffer.isBuffer(t)?t:e.Buffer.from(t,"base64");if("string"==typeof t){var n=e.newBuffer(e.base64.length(t));return e.base64.decode(t,n,0),n}return t instanceof e.Array?t:new e.Array(t)}}},{10:10}],7:[function(t,n,i){"use strict";function r(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),n=0;if(this.len-this.pos>4){for(n=0;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>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(n=0;n<4;++n){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>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(n=0;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(n=0;n<5;++n){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+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 f(){return o.call(this).toLong(!0)}function h(){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,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-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 y(){return p.call(this).zzDecode().toNumber()}function v(){w.Long?(N.int64=s,N.uint64=f,N.sint64=l,N.fixed64=d,N.sfixed64=g):(N.int64=u,N.uint64=h,N.sint64=a,N.fixed64=b,N.sfixed64=y)}n.exports=e;var m,w=t(10),A=w.LongBits,x=w.utf8;e.create=w.Buffer?function(n){return m||(m=t(8)),(e.create=function(t){return new m(t)})(n)}:function(t){return new e(t)};var N=e.prototype;N.b=w.Array.prototype.subarray||w.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),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(i,r){return n[0]=i[r],n[1]=i[r+1],n[2]=i[r+2],n[3]=i[r+3],t[0]}:function(i,r){return n[3]=i[r],n[2]=i[r+1],n[1]=i[r+2],n[0]=i[r+3],t[0]}}():function(t,n){var i=c(t,n+4),r=2*(i>>31)+1,e=i>>>23&255,o=8388607&i;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 B="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(i,r){return n[0]=i[r],n[1]=i[r+1],n[2]=i[r+2],n[3]=i[r+3],n[4]=i[r+4],n[5]=i[r+5],n[6]=i[r+6],n[7]=i[r+7],t[0]}:function(i,r){return n[7]=i[r],n[6]=i[r+1],n[5]=i[r+2],n[4]=i[r+3],n[3]=i[r+4],n[2]=i[r+5],n[1]=i[r+6],n[0]=i[r+7],t[0]}}():function(t,n){var i=c(t,n+4),r=c(t,n+8),e=2*(r>>31)+1,o=r>>>20&2047,s=4294967296*(1048575&r)+i;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=B(this.buf,this.pos);return this.pos+=8,t},N.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw r(this,t);return this.pos+=t,n===i?new this.buf.constructor(0):this.b.call(this.buf,n,i)},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+" at offset "+this.pos)}return this},e.a=v,v()},{10:10,8:8}],8:[function(t,n,i){"use strict";function r(t){e.call(this,t)}n.exports=r;var e=t(7),o=r.prototype=Object.create(e.prototype);o.constructor=r;var s=t(10);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))}},{10:10,7:7}],9:[function(t,n,i){"use strict";function r(t,n){this.lo=t,this.hi=n}n.exports=r;var e=t(10),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 n=t<0;n&&(t=-t);var i=t>>>0,e=(t-i)/4294967296>>>0;return n&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new r(i,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 n=~this.lo+1>>>0,i=~this.hi>>>0;return n||(i=i+1>>>0),-(n+4294967296*i)}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 f=String.prototype.charCodeAt;r.fromHash=function(t){return t===u?s:new r((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)},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,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{10:10}],10:[function(require,module,exports){(function(global){"use strict";var util=exports;util.LongBits=require(9),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(n,i){return new t(n,i)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),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,n){var i=util.LongBits.fromHash(t);return util.Long?util.Long.fromBits(i.lo,i.hi,n):i.toNumber(Boolean(n))},util.longNe=function(t,n,i){if("object"==typeof t)return t.low!==n||t.high!==i;var r=util.LongBits.from(t);return r.lo!==n||r.hi!==i},util.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},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,9:9}],11:[function(t,n,i){"use strict";function r(t,n,i){this.fn=t,this.len=n,this.next=void 0,this.val=i}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,n,i){n[i]=255&t}function f(t,n,i){for(;t>127;)n[i++]=127&t|128,t>>>=7;n[i]=t}function h(t,n,i){for(;t.hi;)n[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[i++]=127&t.lo|128,t.lo=t.lo>>>7;n[i++]=t.lo}function l(t,n,i){n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i]=t>>>24}n.exports=s;var a,c=t(10),p=c.LongBits,d=c.base64,b=c.utf8;s.create=c.Buffer?function(){return a||(a=t(12)),(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,n,i){return this.tail=this.tail.next=new r(t,n,i),this.len+=n,this},g.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},g.int32=function(t){return t<0?this.push(h,10,p.fromNumber(t)):this.uint32(t)},g.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},g.uint64=function(t){var n=p.from(t);return this.push(h,n.length(),n)},g.int64=g.uint64,g.sint64=function(t){var n=p.from(t).zzEncode();return this.push(h,n.length(),n)},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 n=p.from(t);return this.push(l,4,n.lo).push(l,4,n.hi)},g.sfixed64=function(t){var n=p.from(t).zzEncode();return this.push(l,4,n.lo).push(l,4,n.hi)};var y="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(i,r,e){t[0]=i,r[e++]=n[0],r[e++]=n[1],r[e++]=n[2],r[e]=n[3]}:function(i,r,e){t[0]=i,r[e++]=n[3],r[e++]=n[2],r[e++]=n[1],r[e]=n[0]}}():function(t,n,i){var r=t<0?1:0;if(r&&(t=-t),0===t)l(1/t>0?0:2147483648,n,i);else if(isNaN(t))l(2147483647,n,i);else if(t>3.4028234663852886e38)l((r<<31|2139095040)>>>0,n,i);else if(t<1.1754943508222875e-38)l((r<<31|Math.round(t/1.401298464324817e-45))>>>0,n,i);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,n,i)}};g.float=function(t){return this.push(y,4,t)};var v="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(i,r,e){t[0]=i,r[e++]=n[0],r[e++]=n[1],r[e++]=n[2],r[e++]=n[3],r[e++]=n[4],r[e++]=n[5],r[e++]=n[6],r[e]=n[7]}:function(i,r,e){t[0]=i,r[e++]=n[7],r[e++]=n[6],r[e++]=n[5],r[e++]=n[4],r[e++]=n[3],r[e++]=n[2],r[e++]=n[1],r[e]=n[0]}}():function(t,n,i){var r=t<0?1:0;if(r&&(t=-t),0===t)l(0,n,i),l(1/t>0?0:2147483648,n,i+4);else if(isNaN(t))l(4294967295,n,i),l(2147483647,n,i+4);else if(t>1.7976931348623157e308)l(0,n,i),l((r<<31|2146435072)>>>0,n,i+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,l(e>>>0,n,i),l((r<<31|e/4294967296)>>>0,n,i+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,n,i),l((r<<31|o+1023<<20|1048576*e&1048575)>>>0,n,i+4)}}};g.double=function(t){return this.push(v,8,t)};var m=c.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r>>0;if("string"==typeof t&&n){var i=s.alloc(n=d.length(t));d.decode(t,i,0),t=i}return n?this.uint32(n).push(m,n,t):this.push(u,1,0)},g.string=function(t){var n=b.length(t);return n?this.uint32(n).push(b.write,n,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,n=this.tail,i=this.len;return this.reset().uint32(i).tail.next=t.next,this.tail=n,this.len+=i,this},g.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n}},{10:10,12:12}],12:[function(t,n,i){"use strict";function r(){o.call(this)}function e(t,n,i){t.length<40?f.write(t,n,i):n.utf8Write(t,i)}n.exports=r;var o=t(11),s=r.prototype=Object.create(o.prototype);s.constructor=r;var u=t(10),f=u.utf8,h=u.Buffer;r.alloc=function(t){return(r.alloc=h.allocUnsafe)(t)};var l=h&&h.prototype instanceof Uint8Array&&"set"===h.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){t.copy(n,i,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=h.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(l,n,t),this},s.string=function(t){var n=h.byteLength(t);return this.uint32(n),n&&this.push(e,n,t),this}},{10:10,11:11}]},{},[5]); +!function t(n,r,i){function e(s,u){if(!r[s]){if(!n[s]){var f="function"==typeof require&&require;if(!u&&f)return f(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var a=r[s]={exports:{}};n[s][0].call(a.exports,function(t){var r=n[s][1][t];return e(r?r:t)},a,a.exports,t,n,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s>>1,o=null,s=i;return function(r){if(r<1||r>e)return t(r);s+r>i&&(o=t(i),s=0);var u=n.call(o,s,s+=r);return 7&s&&(s=(7|s)+1),u}}n.exports=i},{}],3:[function(t,n,r){"use strict";var i=r;i.length=function(t){for(var n=0,r=0,i=0;i191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],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)):""},i.write=function(t,n,r){for(var i,e,o=r,s=0;s>6|192,n[r++]=63&i|128):55296===(64512&i)&&56320===(64512&(e=t.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&e),++s,n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128);return r-o}},{}],4:[function(t,n,r){(function(n){"use strict";function i(){e.Reader.a()}var e=n.protobuf=r;e.Writer=t(11),e.BufferWriter=t(12),e.Reader=t(6),e.BufferReader=t(7),e.converters=t(5),e.util=t(10),e.roots={},e.configure=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(e.util.Long=t,i()),e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,5:5,6:6,7:7}],5:[function(t,n,r){"use strict";var i=r,e=t(10);i.json={create:function(t,n,r){return t?r.fieldsOnly?{}:e.merge({},t):null},enums:function(t,n,r,i){if(i.defaults)void 0===t&&(t=n);else if(void 0===t||t===n)return;return i.enums===String&&"number"==typeof t?r[t]:t},longs:function(t,n,r,i,o){if(t){if(!e.longNe(t,n,r)&&!o.defaults)return}else{if(!o.defaults)return;t={low:n,high:r}}return o.longs===Number?"number"==typeof t?t:e.LongBits.from(t).toNumber(i):o.longs===String?"number"==typeof t?e.Long.fromNumber(t,i).toString():(t=e.Long.fromValue(t),t.unsigned=i,t.toString()):t},bytes:function(t,n,r){if(t){if(!t.length&&!r.defaults)return}else{if(!r.defaults)return;t=n}return r.bytes===String?e.base64.encode(t,0,t.length):r.bytes===Array?Array.prototype.slice.call(t):r.bytes!==e.Buffer||e.Buffer.isBuffer(t)?t:e.Buffer.from(t)}},i.message={create:function(t,n,r){return t?new(n.ctor?n.ctor:n)(r.fieldsOnly?void 0:t):null},enums:function(t,n,r){return"string"==typeof t?r[t]:0|t},longs:function(t,n,r,i){return"string"==typeof t?e.Long.fromString(t,i):"number"==typeof t?e.Long.fromNumber(t,i):t},bytes:function(t){if(e.Buffer)return e.Buffer.isBuffer(t)?t:e.Buffer.from(t,"base64");if("string"==typeof t){var n=e.newBuffer(e.base64.length(t));return e.base64.decode(t,n,0),n}return t instanceof e.Array?t:new e.Array(t)}}},{10:10}],6:[function(t,n,r){"use strict";function i(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),n=0;if(this.len-this.pos>4){for(n=0;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>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(n=0;n<4;++n){if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw i(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(n=0;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(n=0;n<5;++n){if(this.pos>=this.len)throw i(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+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 f(){return o.call(this).toLong(!0)}function h(){return o.call(this).toNumber(!0)}function a(){return o.call(this).zzDecode().toLong()}function l(){return o.call(this).zzDecode().toNumber()}function c(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw i(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 g(){return p.call(this).toNumber(!0)}function b(){return p.call(this).zzDecode().toLong()}function y(){return p.call(this).zzDecode().toNumber()}function v(){w.Long?(B.int64=s,B.uint64=f,B.sint64=a,B.fixed64=d,B.sfixed64=b):(B.int64=u,B.uint64=h,B.sint64=l,B.fixed64=g,B.sfixed64=y)}n.exports=e;var m,w=t(10),A=w.LongBits,N=w.utf8;e.create=w.Buffer?function(n){return m||(m=t(7)),(e.create=function(t){return w.Buffer.isBuffer(t)?new m(t):new e(t)})(n)}:function(t){return new e(t)};var B=e.prototype;B.b=w.Array.prototype.subarray||w.Array.prototype.slice,B.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,i(this,10);return t}}(),B.int32=function(){return 0|this.uint32()},B.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},B.bool=function(){return 0!==this.uint32()},B.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},B.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var x="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],t[0]}:function(r,i){return n[3]=r[i],n[2]=r[i+1],n[1]=r[i+2],n[0]=r[i+3],t[0]}}():function(t,n){var r=c(t,n+4),i=2*(r>>31)+1,e=r>>>23&255,o=8388607&r;return 255===e?o?NaN:i*(1/0):0===e?1.401298464324817e-45*i*o:i*Math.pow(2,e-150)*(o+8388608)};B.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=x(this.buf,this.pos);return this.pos+=4,t};var L="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],n[4]=r[i+4],n[5]=r[i+5],n[6]=r[i+6],n[7]=r[i+7],t[0]}:function(r,i){return n[7]=r[i],n[6]=r[i+1],n[5]=r[i+2],n[4]=r[i+3],n[3]=r[i+4],n[2]=r[i+5],n[1]=r[i+6],n[0]=r[i+7],t[0]}}():function(t,n){var r=c(t,n+4),i=c(t,n+8),e=2*(i>>31)+1,o=i>>>20&2047,s=4294967296*(1048575&i)+r;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};B.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=L(this.buf,this.pos);return this.pos+=8,t},B.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,n===r?new this.buf.constructor(0):this.b.call(this.buf,n,r)},B.string=function(){var t=this.bytes();return N.read(t,0,t.length)},B.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw i(this,t);this.pos+=t}else do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++]);return this},B.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+" at offset "+this.pos)}return this},e.a=v,v()},{10:10,7:7}],7:[function(t,n,r){"use strict";function i(t){e.call(this,t)}n.exports=i;var e=t(6),o=i.prototype=Object.create(e.prototype);o.constructor=i;var s=t(10);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))}},{10:10,6:6}],8:[function(t,n,r){"use strict";var i=r;i.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&"="===t.charAt(n);)++r;return Math.ceil(3*t.length)/4-r};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++;i.encode=function(t,n,r){for(var i,o=[],s=0,u=0;n>2],i=(3&f)<<4,u=1;break;case 1:o[s++]=e[i|f>>4],i=(15&f)<<2,u=2;break;case 2:o[s++]=e[i|f>>6],o[s++]=e[63&f],u=0}}return u&&(o[s++]=e[i],o[s]=61,1===u&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";i.decode=function(t,n,r){for(var i,e=r,s=0,f=0;f1)break;if(void 0===(h=o[h]))throw Error(u);switch(s){case 0:i=h,s=1;break;case 1:n[r++]=i<<2|(48&h)>>4,i=h,s=2;break;case 2:n[r++]=(15&i)<<4|(60&h)>>2,i=h,s=3;break;case 3:n[r++]=(3&i)<<6|h,s=0}}if(1===s)throw Error(u);return r-e},i.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],9:[function(t,n,r){"use strict";function i(t,n){this.lo=t,this.hi=n}n.exports=i;var e=t(10),o=i.prototype,s=i.zero=new i(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var u=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return s;var n=t<0;n&&(t=-t);var r=t>>>0,e=(t-r)/4294967296>>>0;return n&&(e=~e>>>0,r=~r>>>0,++r>4294967295&&(r=0,++e>4294967295&&(e=0))),new i(r,e)},i.from=function(t){if("number"==typeof t)return i.fromNumber(t);if("string"==typeof t){if(!e.Long)return i.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):s},o.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+4294967296*r)}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 f=String.prototype.charCodeAt;i.fromHash=function(t){return t===u?s:new i((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)},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,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}},{10:10}],10:[function(t,n,r){(function(n){"use strict";var i=r;i.LongBits=t(9),i.base64=t(8),i.inquire=t(1),i.utf8=t(3),i.pool=t(2),i.isNode=Boolean(n.process&&n.process.versions&&n.process.versions.node),i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(n,r){return new t(n,r)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),t):null}catch(t){return null}}(),i.Array="undefined"==typeof Uint8Array?Array:Uint8Array,i.Long=n.dcodeIO&&n.dcodeIO.Long||i.inquire("long"),i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,n){var r=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,n):r.toNumber(Boolean(n))},i.longNe=function(t,n,r){if("object"==typeof t)return t.low!==n||t.high!==r;var e=i.LongBits.from(t);return e.lo!==n||e.hi!==r},i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.arrayNe=function(t,n){if(t.length===n.length)for(var r=0;r127;)n[r++]=127&t|128,t>>>=7;n[r]=t}function h(t,n,r){for(;t.hi;)n[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[r++]=127&t.lo|128,t.lo=t.lo>>>7;n[r++]=t.lo}function a(t,n,r){n[r++]=255&t,n[r++]=t>>>8&255,n[r++]=t>>>16&255,n[r]=t>>>24}n.exports=s;var l,c=t(10),p=c.LongBits,d=c.base64,g=c.utf8;s.create=c.Buffer?function(){return l||(l=t(12)),(s.create=function(){return new l})()}: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 b=s.prototype;b.push=function(t,n,r){return this.tail=this.tail.next=new i(t,n,r),this.len+=n,this},b.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},b.int32=function(t){return t<0?this.push(h,10,p.fromNumber(t)):this.uint32(t)},b.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},b.uint64=function(t){var n=p.from(t);return this.push(h,n.length(),n)},b.int64=b.uint64,b.sint64=function(t){var n=p.from(t).zzEncode();return this.push(h,n.length(),n)},b.bool=function(t){return this.push(u,1,t?1:0)},b.fixed32=function(t){return this.push(a,4,t>>>0)},b.sfixed32=function(t){return this.push(a,4,t<<1^t>>31)},b.fixed64=function(t){var n=p.from(t);return this.push(a,4,n.lo).push(a,4,n.hi)},b.sfixed64=function(t){var n=p.from(t).zzEncode();return this.push(a,4,n.lo).push(a,4,n.hi)};var y="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e]=n[3]}:function(r,i,e){t[0]=r,i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(1/t>0?0:2147483648,n,r);else if(isNaN(t))a(2147483647,n,r);else if(t>3.4028234663852886e38)a((i<<31|2139095040)>>>0,n,r);else if(t<1.1754943508222875e-38)a((i<<31|Math.round(t/1.401298464324817e-45))>>>0,n,r);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);a((i<<31|e+127<<23|o)>>>0,n,r)}};b.float=function(t){return this.push(y,4,t)};var v="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e++]=n[3],i[e++]=n[4],i[e++]=n[5],i[e++]=n[6],i[e]=n[7]}:function(r,i,e){t[0]=r,i[e++]=n[7],i[e++]=n[6],i[e++]=n[5],i[e++]=n[4],i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(0,n,r),a(1/t>0?0:2147483648,n,r+4);else if(isNaN(t))a(4294967295,n,r),a(2147483647,n,r+4);else if(t>1.7976931348623157e308)a(0,n,r),a((i<<31|2146435072)>>>0,n,r+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,a(e>>>0,n,r),a((i<<31|e/4294967296)>>>0,n,r+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),a(4503599627370496*e>>>0,n,r),a((i<<31|o+1023<<20|1048576*e&1048575)>>>0,n,r+4)}}};b.double=function(t){return this.push(v,8,t)};var m=c.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i>>0;if("string"==typeof t&&n){var r=s.alloc(n=d.length(t));d.decode(t,r,0),t=r}return n?this.uint32(n).push(m,n,t):this.push(u,1,0)},b.string=function(t){var n=g.length(t);return n?this.uint32(n).push(g.write,n,t):this.push(u,1,0)},b.fork=function(){return this.states=new o(this),this.head=this.tail=new i(e,0,0),this.len=0,this},b.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 i(e,0,0),this.len=0),this},b.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=n,this.len+=r,this},b.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}},{10:10,12:12}],12:[function(t,n,r){"use strict";function i(){o.call(this)}function e(t,n,r){t.length<40?f.write(t,n,r):n.utf8Write(t,r)}n.exports=i;var o=t(11),s=i.prototype=Object.create(o.prototype);s.constructor=i;var u=t(10),f=u.utf8,h=u.Buffer;i.alloc=function(t){return(i.alloc=h.allocUnsafe)(t)};var a=h&&h.prototype instanceof Uint8Array&&"set"===h.prototype.set.name?function(t,n,r){n.set(t,r)}:function(t,n,r){t.copy(n,r,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=h.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(a,n,t),this},s.string=function(t){var n=h.byteLength(t);return this.uint32(n),n&&this.push(e,n,t),this}},{10:10,11:11}]},{},[4]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/runtime/protobuf.min.js.gz b/dist/runtime/protobuf.min.js.gz index 383907079..b3f02f55e 100644 Binary files a/dist/runtime/protobuf.min.js.gz and b/dist/runtime/protobuf.min.js.gz differ diff --git a/dist/runtime/protobuf.min.js.map b/dist/runtime/protobuf.min.js.map index a87e84a49..b6c91b2dc 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/converters.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","converters","util","roots","define","amd","Long","json","create","value","typeOrCtor","options","fieldsOnly","merge","enums","defaultValue","values","defaults","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","fromNumber","toString","fromValue","bytes","prototype","Buffer","isBuffer","message","ctor","fromString","newBuffer","indexOutOfRange","reader","writeLength","RangeError","pos","this","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","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","_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","constructor","skip","skipType","wireType","BufferReaderPrototype","utf8Slice","min","LongBitsPrototype","zero","zzEncode","zeroHash","parseInt","Boolean","fromHash","hash","toHash","mask","part0","part1","part2","isNode","process","versions","node","isIE8","utf8Write","encoding","allocUnsafe","dcodeIO","isInteger","isFinite","floor","isString","isObject","longToHash","longFromHash","fromBits","val","ucFirst","str","toUpperCase","substring","emptyArray","freeze","emptyObject","Op","fn","next","noop","State","writer","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","WriterPrototype","writeFloat","isNaN","round","log","LN2","writeDouble","writeBytes","set","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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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.converters = require(\"../src/converters\");\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\nvar converters = exports;\r\n\r\nvar util = require(10);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(10);\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(8);\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 + \" at offset \" + this.pos);\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(7);\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\nvar util = require(10);\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(10);\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 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 * 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(10);\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(12);\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(11);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(10);\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/inquire/index.js","node_modules/@protobufjs/pool/index.js","node_modules/@protobufjs/utf8/index.js","runtime/index.js","src/converters.js","src/reader.js","src/reader_buffer.js","src/util/base64/index.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","inquire","moduleName","mod","eval","replace","Object","keys","pool","alloc","slice","size","SIZE","MAX","slab","offset","buf","utf8","string","len","c","charCodeAt","read","buffer","start","end","parts","chunk","push","String","fromCharCode","apply","join","write","c1","c2","configure","protobuf","Reader","_configure","global","Writer","BufferWriter","BufferReader","converters","util","roots","define","amd","Long","json","create","value","typeOrCtor","options","fieldsOnly","merge","enums","defaultValue","values","defaults","undefined","longs","defaultLow","defaultHigh","unsigned","longNe","low","high","Number","LongBits","from","toNumber","fromNumber","toString","fromValue","bytes","base64","encode","Array","prototype","Buffer","isBuffer","message","ctor","fromString","newBuffer","decode","indexOutOfRange","reader","writeLength","RangeError","pos","this","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","ReaderPrototype","int64","uint64","sint64","fixed64","sfixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","Uint8Array","uint","sign","exponent","mantissa","NaN","Infinity","Math","pow","float","readDouble","Float64Array","f64","double","constructor","skip","skipType","wireType","BufferReaderPrototype","utf8Slice","min","p","charAt","ceil","b64","s64","j","b","invalidEncoding","test","LongBitsPrototype","zero","zzEncode","zeroHash","parseInt","Boolean","fromHash","hash","toHash","mask","part0","part1","part2","isNode","process","versions","node","utf8Write","encoding","allocUnsafe","dcodeIO","isInteger","isFinite","floor","isString","isObject","longToHash","longFromHash","fromBits","val","emptyArray","freeze","emptyObject","arrayNe","Op","fn","next","noop","State","writer","head","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","WriterPrototype","writeFloat","isNaN","round","log","LN2","writeDouble","writeBytes","set","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,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,QAAAU,OAAAJ,SCAA,YASA,SAAAK,SAAAC,YACA,IACA,GAAAC,KAAAC,KAAA,QAAAC,QAAA,IAAA,OAAAH,WACA,IAAAC,MAAAA,IAAAL,QAAAQ,OAAAC,KAAAJ,KAAAL,QACA,MAAAK,KACA,MAAArB,IACA,MAAA,MAdAkB,OAAAJ,QAAAK,gCCDA,YA8BA,SAAAO,GAAAC,EAAAC,EAAAC,GACA,GAAAC,GAAAD,GAAA,KACAE,EAAAD,IAAA,EACAE,EAAA,KACAC,EAAAH,CACA,OAAA,UAAAD,GACA,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iG,EAAAmC,KAAAhN,EAAA4E,EAAA,EAAAiG,EAAA/L,QAMA+N,GAAAjJ,MAAA,SAAAxB,GACA,gBAAAA,KACAA,EAAA6B,EAAAV,KAAAnB,EAAA,UACA,IAAAjC,GAAAiC,EAAAtD,SAAA,CAIA,OAHA+F,MAAA2B,OAAArG,GACAA,GACA0E,KAAAjE,KAAAkM,EAAA3M,EAAAiC,GACAyC,MAaAgI,EAAA3M,OAAA,SAAAkC,GACA,GAAAjC,GAAA8D,EAAAgJ,WAAA7K,EAIA,OAHAyC,MAAA2B,OAAArG,GACAA,GACA0E,KAAAjE,KAAAgM,EAAAzM,EAAAiC,GACAyC","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;\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.converters = require(\"../src/converters\");\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\nvar converters = exports;\r\n\r\nvar util = require(10);\r\n\r\n/**\r\n * JSON conversion options as used by {@link Message#asJSON}.\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 * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\r\n */\r\n\r\n/**\r\n * Converter implementation producing JSON.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.json = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n return options.fieldsOnly\r\n ? {}\r\n : util.merge({}, value);\r\n },\r\n enums: function(value, defaultValue, values, options) {\r\n if (!options.defaults) {\r\n if (value === undefined || value === defaultValue)\r\n return undefined;\r\n } else if (value === undefined)\r\n value = defaultValue;\r\n return options.enums === String && typeof value === \"number\"\r\n ? values[value]\r\n : value;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = { low: defaultLow, high: defaultHigh };\r\n else\r\n return undefined;\r\n } else if (!util.longNe(value, defaultLow, defaultHigh) && !options.defaults)\r\n return undefined;\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 return value;\r\n },\r\n bytes: function(value, defaultValue, options) {\r\n if (!value) {\r\n if (options.defaults)\r\n value = defaultValue;\r\n else\r\n return undefined;\r\n } else if (!value.length && !options.defaults)\r\n return undefined;\r\n return options.bytes === String\r\n ? util.base64.encode(value, 0, value.length)\r\n : options.bytes === Array\r\n ? Array.prototype.slice.call(value)\r\n : options.bytes === util.Buffer && !util.Buffer.isBuffer(value)\r\n ? util.Buffer.from(value) // polyfilled\r\n : value;\r\n }\r\n};\r\n\r\n/**\r\n * Message conversion options as used by {@link Message.from} and {@link Type#from}.\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// Note that options.defaults and options.arrays also affect the message converter.\r\n// As defaults are already on the prototype, usage is not recommended and thus undocumented.\r\n\r\n/**\r\n * Converter implementation producing runtime messages.\r\n * @type {ConverterImpl}\r\n */\r\nconverters.message = {\r\n create: function(value, typeOrCtor, options) {\r\n if (!value)\r\n return null;\r\n // can't use instanceof Type here because converters are also part of the minimal runtime\r\n return new (typeOrCtor.ctor ? typeOrCtor.ctor : typeOrCtor)(options.fieldsOnly ? undefined : value);\r\n },\r\n enums: function(value, defaultValue, values) {\r\n if (typeof value === \"string\")\r\n return values[value];\r\n return value | 0;\r\n },\r\n longs: function(value, defaultLow, defaultHigh, unsigned) {\r\n if (typeof value === \"string\")\r\n return util.Long.fromString(value, unsigned);\r\n if (typeof value === \"number\")\r\n return util.Long.fromNumber(value, unsigned);\r\n return value;\r\n },\r\n bytes: function(value/*, defaultValue*/) {\r\n if (util.Buffer)\r\n return util.Buffer.isBuffer(value)\r\n ? value\r\n : util.Buffer.from(value, \"base64\"); // polyfilled\r\n if (typeof value === \"string\") {\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 return value instanceof util.Array\r\n ? value\r\n : new util.Array(value);\r\n }\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(10);\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 util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n : new Reader(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 + \" at offset \" + this.pos);\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(10);\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\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\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(10);\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(\"./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 * 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 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 * 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\r\n/**\r\n * Tests if two arrays are not equal.\r\n * @param {Array.<*>} a Array 1\r\n * @param {Array.<*>} b Array 2\r\n * @returns {boolean} `true` if not equal, otherwise `false`\r\n */\r\nutil.arrayNe = function arrayNe(a, b) {\r\n if (a.length === b.length)\r\n for (var i = 0; i < a.length; ++i)\r\n if (a[i] !== b[i])\r\n return true;\r\n return false;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(10);\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(12);\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(11);\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nvar util = require(10);\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/index.d.ts b/index.d.ts index 2b69b5c8f..3ac0451e6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ // $> pbts --main --global protobuf --out index.d.ts src -// Generated Mon, 02 Jan 2017 13:12:35 UTC +// Generated Mon, 02 Jan 2017 15:34:42 UTC export as namespace protobuf; @@ -1048,12 +1048,6 @@ export class OneOf extends ReflectionObject { */ constructor(name: string, fieldNames?: (string[]|Object), options?: { [k: string]: any }); - /** - * Upper cased name for getter/setter calls. - * @type {string} - */ - ucName: string; - /** * Field names that belong to this oneof. * @type {string[]} @@ -1994,6 +1988,13 @@ export namespace util { * @throws {Error} If encoding is invalid */ function decode(string: string, buffer: Uint8Array, offset: number): number; + + /** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ + function test(string: string): boolean; } /** @@ -2232,13 +2233,6 @@ export namespace util { */ var isNode: boolean; - /** - * Whether running within IE8 or not. - * @memberof util - * @type {boolean} - */ - var isIE8: boolean; - /** * Node's Buffer class if available. * @type {?function(new: Buffer)} @@ -2303,13 +2297,6 @@ export namespace util { */ function longNe(val: (number|string|Long), lo: number, hi: number): boolean; - /** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ - function ucFirst(str: string): string; - /** * An immuable empty array. * @memberof util @@ -2323,6 +2310,14 @@ export namespace util { */ var emptyObject: Object; + /** + * Tests if two arrays are not equal. + * @param {Array.<*>} a Array 1 + * @param {Array.<*>} b Array 2 + * @returns {boolean} `true` if not equal, otherwise `false` + */ + function arrayNe(a: any[], b: any[]): boolean; + /** * A minimal UTF8 implementation for number arrays. * @memberof util @@ -2386,12 +2381,19 @@ export namespace util { function safeProp(prop: string): string; /** - * Converts the second character of a string to lower case. + * Converts the first character of a string to lower case. * @param {string} str String to convert * @returns {string} Converted string */ function lcFirst(str: string): string; + /** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ + function ucFirst(str: string): string; + /** * Creates a new buffer of whatever type supported by the environment. * @param {number} [size=0] Buffer size diff --git a/src/class.js b/src/class.js index fb771e46e..261b00a7a 100644 --- a/src/class.js +++ b/src/class.js @@ -6,8 +6,6 @@ var Message = require("./message"), var Type; // cyclic -var TypeError = util._TypeError; - /** * Constructs a class instance, which is also a message prototype. * @classdesc Runtime class providing the tools to create your own custom classes. @@ -31,12 +29,12 @@ function create(type, ctor) { /* istanbul ignore next */ if (!(type instanceof Type)) - throw TypeError("type", "a Type"); + throw TypeError("type must be a Type"); if (ctor) { /* istanbul ignore next */ if (typeof ctor !== "function") - throw TypeError("ctor", "a function"); + throw TypeError("ctor must be a function"); } else ctor = (function(MessageCtor) { return function Message(properties) { diff --git a/src/converter.js b/src/converter.js index 1245518ce..81f7c5873 100644 --- a/src/converter.js +++ b/src/converter.js @@ -20,7 +20,7 @@ function genConvert(field, fieldIndex, prop) { case "sfixed64": return sprintf("f.longs(s%s,%d,%d,%j,o)", prop, 0, 0, field.type.charAt(0) === "u"); case "bytes": - return sprintf("f.bytes(s%s,%j,o)", prop, field.defaultValue); + return sprintf("f.bytes(s%s,%j,o)", prop, Array.prototype.slice.call(field.defaultValue)); } return null; } diff --git a/src/encoder.js b/src/encoder.js index b235c1817..80366d295 100644 --- a/src/encoder.js +++ b/src/encoder.js @@ -77,10 +77,11 @@ function encoder(mtype) { } else if (!field.partOf) { if (!field.required) { - if (field.long) { - gen + if (field.long) gen ("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))", ref, ref, ref, field.defaultValue.low, field.defaultValue.high); - } else gen + else if (field.bytes) gen + ("if(%s&&%s.length" + (field.defaultValue.length ? "&&util.arrayNe(%s,%j)" : "") + ")", ref, ref, ref, Array.prototype.slice.call(field.defaultValue)); + else gen ("if(%s!==undefined&&%s!==%j)", ref, ref, field.defaultValue); } diff --git a/src/enum.js b/src/enum.js index 1765934b4..c847fceda 100644 --- a/src/enum.js +++ b/src/enum.js @@ -9,8 +9,6 @@ Enum.className = "Enum"; var util = require("./util"); -var TypeError = util._TypeError; - /** * Constructs a new enum instance. * @classdesc Reflected enum. @@ -94,10 +92,10 @@ EnumPrototype.add = function(name, id) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (this.values[name] !== undefined) throw Error("duplicate name '" + name + "' in " + this); @@ -118,7 +116,7 @@ EnumPrototype.add = function(name, id) { */ EnumPrototype.remove = function(name) { if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); var val = this.values[name]; if (val === undefined) throw Error("'" + name + "' is not a name of " + this); diff --git a/src/field.js b/src/field.js index 9757a7cdb..d0b9f5a9f 100644 --- a/src/field.js +++ b/src/field.js @@ -14,8 +14,6 @@ var Enum = require("./enum"), var Type, // cyclic MapField; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. * @classdesc Reflected message field. @@ -40,16 +38,16 @@ function Field(name, id, type, rule, extend, options) { /* istanbul ignore next */ if (!util.isInteger(id) || id < 0) - throw TypeError("id", "a non-negative integer"); + throw TypeError("id must be a non-negative integer"); /* istanbul ignore next */ if (!util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend"); + throw TypeError("extend must be a string"); /* istanbul ignore next */ if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule", "a valid rule string"); + throw TypeError("rule must be a string rule"); /** * Field rule, if any. @@ -261,6 +259,13 @@ FieldPrototype.resolve = function resolve() { this.defaultValue = util.Long.fromNumber(this.defaultValue, this.type.charAt(0) === "u"); if (Object.freeze) Object.freeze(this.defaultValue); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + } else if (this.bytes && typeof this.defaultValue === "string") { + var buf; + if (util.base64.test(this.defaultValue)) + util.base64.decode(this.defaultValue, buf = util.newBuffer(util.base64.length(this.defaultValue)), 0); + else + util.utf8.write(this.defaultValue, buf = util.newBuffer(util.utf8.length(this.defaultValue)), 0); + this.defaultValue = buf; } } diff --git a/src/mapfield.js b/src/mapfield.js index f8314fc9c..1efc01e95 100644 --- a/src/mapfield.js +++ b/src/mapfield.js @@ -28,7 +28,7 @@ function MapField(name, id, keyType, type, options) { /* istanbul ignore next */ if (!util.isString(keyType)) - throw util._TypeError("keyType"); + throw TypeError("keyType must be a string"); /** * Key type. diff --git a/src/method.js b/src/method.js index 575206096..384541d08 100644 --- a/src/method.js +++ b/src/method.js @@ -10,8 +10,6 @@ Method.className = "Method"; var Type = require("./type"), util = require("./util"); -var TypeError = util._TypeError; - /** * Constructs a new service method instance. * @classdesc Reflected service method. @@ -38,13 +36,13 @@ function Method(name, type, requestType, responseType, requestStream, responseSt /* istanbul ignore next */ if (type && !util.isString(type)) - throw TypeError("type"); + throw TypeError("type must be a string"); /* istanbul ignore next */ if (!util.isString(requestType)) - throw TypeError("requestType"); + throw TypeError("requestType must be a string"); /* istanbul ignore next */ if (!util.isString(responseType)) - throw TypeError("responseType"); + throw TypeError("responseType must be a string"); ReflectionObject.call(this, name, options); diff --git a/src/namespace.js b/src/namespace.js index 15a8a1eae..a11e84bbf 100644 --- a/src/namespace.js +++ b/src/namespace.js @@ -30,8 +30,6 @@ function initNested() { nestedError = "one of " + nestedTypes.map(function(ctor) { return ctor.name; }).join(", "); } -var TypeError = util._TypeError; - /** * Constructs a new namespace instance. * @classdesc Reflected namespace and base class of all reflection objects containing nested objects. @@ -157,7 +155,7 @@ NamespacePrototype.addJSON = function addJSON(nestedJson) { for (var j = 0; j < nestedTypes.length; ++j) if (nestedTypes[j].testJSON(nested)) return ns.add(nestedTypes[j].fromJSON(nestedName, nested)); - throw TypeError("nested." + nestedName, "JSON for " + nestedError); + throw TypeError("nested." + nestedName + " must be JSON for " + nestedError); }); } return this; @@ -200,10 +198,10 @@ NamespacePrototype.add = function add(object) { /* istanbul ignore next */ if (!object || nestedTypes.indexOf(object.constructor) < 0) - throw TypeError("object", nestedError); + throw TypeError("object must be " + nestedError); /* istanbul ignore next */ if (object instanceof Field && object.extend === undefined) - throw TypeError("object", "an extension field when not part of a type"); + throw TypeError("object must be an extension field when not part of a type"); if (!this.nested) this.nested = {}; @@ -242,7 +240,7 @@ NamespacePrototype.remove = function remove(object) { /* istanbul ignore next */ if (!(object instanceof ReflectionObject)) - throw TypeError("object", "a ReflectionObject"); + throw TypeError("object must be a ReflectionObject"); /* istanbul ignore next */ if (object.parent !== this || !this.nested) throw Error(object + " is not a member of " + this); diff --git a/src/object.js b/src/object.js index 766377666..2543de0e0 100644 --- a/src/object.js +++ b/src/object.js @@ -8,8 +8,6 @@ ReflectionObject.extend = util.extend; var Root; // cyclic -var TypeError = util._TypeError; - /** * Constructs a new reflection object instance. * @classdesc Base class of all reflection objects. @@ -22,10 +20,10 @@ function ReflectionObject(name, options) { /* istanbul ignore next */ if (!util.isString(name)) - throw TypeError("name"); + throw TypeError("name must be a string"); /* istanbul ignore next */ if (options && !util.isObject(options)) - throw TypeError("options", "an object"); + throw TypeError("options must be an object"); /** * Options. diff --git a/src/oneof.js b/src/oneof.js index 710587990..d3e22489e 100644 --- a/src/oneof.js +++ b/src/oneof.js @@ -7,10 +7,7 @@ var OneOfPrototype = ReflectionObject.extend(OneOf); OneOf.className = "OneOf"; -var Field = require("./field"), - util = require("./util"); - -var TypeError = util._TypeError; +var Field = require("./field"); /** * Constructs a new oneof instance. @@ -30,13 +27,7 @@ function OneOf(name, fieldNames, options) { /* istanbul ignore next */ if (fieldNames && !Array.isArray(fieldNames)) - throw TypeError("fieldNames", "an Array"); - - /** - * Upper cased name for getter/setter calls. - * @type {string} - */ - this.ucName = util.ucFirst(this.name); + throw TypeError("fieldNames must be an Array"); /** * Field names that belong to this oneof. @@ -119,7 +110,7 @@ OneOfPrototype.add = function add(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); if (field.parent) field.parent.remove(field); @@ -139,7 +130,7 @@ OneOfPrototype.remove = function remove(field) { /* istanbul ignore next */ if (!(field instanceof Field)) - throw TypeError("field", "a Field"); + throw TypeError("field must be a Field"); var index = this._fieldsArray.indexOf(field); /* istanbul ignore next */ diff --git a/src/service.js b/src/service.js index ca93927c9..08574e52c 100644 --- a/src/service.js +++ b/src/service.js @@ -181,7 +181,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel /* istanbul ignore next */ if (!request) - throw util._TypeError("request", "not null"); + throw TypeError("request must not be null"); method.resolve(); var requestData; diff --git a/src/type.js b/src/type.js index de1144a73..4559fa450 100644 --- a/src/type.js +++ b/src/type.js @@ -175,7 +175,7 @@ Object.defineProperties(TypePrototype, { }, set: function(ctor) { if (ctor && !(ctor.prototype instanceof Message)) - throw util._TypeError("ctor", "a Message constructor"); + throw TypeError("ctor must be a Message constructor"); if (!ctor.from) ctor.from = Message.from; this._ctor = ctor; diff --git a/src/util.js b/src/util.js index e1a877cde..88780797b 100644 --- a/src/util.js +++ b/src/util.js @@ -25,25 +25,9 @@ util.fs = util.inquire("fs"); * @returns {Array.<*>} Converted array */ util.toArray = function toArray(object) { - if (!object) - return []; - var names = Object.keys(object), - length = names.length; - var array = new Array(length); - for (var i = 0; i < length; ++i) - array[i] = object[names[i]]; - return array; -}; - -/** - * Creates a type error. - * @param {string} name Argument name - * @param {string} [description="a string"] Expected argument descripotion - * @returns {TypeError} Created type error - * @private - */ -util._TypeError = function(name, description) { - return TypeError(name + " must be " + (description || "a string")); + return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) { + return object[key]; + }) : []; }; /** @@ -73,14 +57,23 @@ util.safeProp = function safeProp(prop) { }; /** - * Converts the second character of a string to lower case. + * Converts the first character of a string to lower case. * @param {string} str String to convert * @returns {string} Converted string */ -util.lcFirst = function lcFirst(str) { // ucFirst counterpart is in runtime util +util.lcFirst = function lcFirst(str) { return str.charAt(0).toLowerCase() + str.substring(1); }; +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + /** * Creates a new buffer of whatever type supported by the environment. * @param {number} [size=0] Buffer size diff --git a/src/util/base64/index.d.ts b/src/util/base64/index.d.ts index ec7883320..53f58b95a 100644 --- a/src/util/base64/index.d.ts +++ b/src/util/base64/index.d.ts @@ -32,4 +32,11 @@ declare namespace base64 { * @throws {Error} If encoding is invalid */ function decode(string: string, buffer: Uint8Array, offset: number): number; + + /** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if it appears to be base64 encoded, otherwise false + */ + function test(string: string): boolean; } diff --git a/src/util/base64/index.js b/src/util/base64/index.js index c21cd4df2..001344f77 100644 --- a/src/util/base64/index.js +++ b/src/util/base64/index.js @@ -118,3 +118,12 @@ base64.decode = function decode(string, buffer, offset) { throw Error(invalidEncoding); return offset - start; }; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; diff --git a/src/util/runtime.js b/src/util/runtime.js index 5d64744f8..8a49380dc 100644 --- a/src/util/runtime.js +++ b/src/util/runtime.js @@ -3,7 +3,7 @@ var util = exports; util.LongBits = require("./longbits"); -util.base64 = require("@protobufjs/base64"); +util.base64 = require("./base64"); util.inquire = require("@protobufjs/inquire"); util.utf8 = require("@protobufjs/utf8"); util.pool = require("@protobufjs/pool"); @@ -15,13 +15,6 @@ util.pool = require("@protobufjs/pool"); */ util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node); -/** - * Whether running within IE8 or not. - * @memberof util - * @type {boolean} - */ -util.isIE8 = false; try { util.isIE8 = eval("!-[1,]"); } catch (e) {} // eslint-disable-line no-eval, no-empty - /** * Node's Buffer class if available. * @type {?function(new: Buffer)} @@ -128,15 +121,6 @@ util.longNe = function longNe(val, lo, hi) { return bits.lo !== lo || bits.hi !== hi; }; -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { // lcFirst counterpart is in core util - return str.charAt(0).toUpperCase() + str.substring(1); -}; - /** * An immuable empty array. * @memberof util @@ -149,3 +133,17 @@ util.emptyArray = Object.freeze ? Object.freeze([]) : []; * @type {Object} */ util.emptyObject = Object.freeze ? Object.freeze({}) : {}; + +/** + * Tests if two arrays are not equal. + * @param {Array.<*>} a Array 1 + * @param {Array.<*>} b Array 2 + * @returns {boolean} `true` if not equal, otherwise `false` + */ +util.arrayNe = function arrayNe(a, b) { + if (a.length === b.length) + for (var i = 0; i < a.length; ++i) + if (a[i] !== b[i]) + return true; + return false; +}; diff --git a/tests/basics.js b/tests/basics.js index 7232237ad..2b6fb7fc4 100644 --- a/tests/basics.js +++ b/tests/basics.js @@ -14,7 +14,8 @@ tape.test("google.protobuf.Any type", function(test) { test.ok(Any instanceof protobuf.Type, "should extend Type"); - var valueBuffer = protobuf.util.newBuffer(0); + var valueBuffer = protobuf.util.newBuffer(1); + valueBuffer[0] = 0; var any = Any.create({ type_url: "some.type", value: valueBuffer @@ -36,8 +37,8 @@ tape.test("google.protobuf.Any type", function(test) { test.equal(buf[0] , 1 << 3 | 2, "a tag with id 1, wire type 2"); test.equal(buf[1] , 9 , "a field length of 9"); test.equal(buf[11] , 2 << 3 | 2, "a tag with id 2, wire type 2"); - test.equal(buf[12] , 0 , "a field length of 0"); - test.equal(buf.length, 13 , "13 bytes in total"); + test.equal(buf[12] , 1 , "a field length of 1"); + test.equal(buf.length, 14 , "14 bytes in total"); } test.test("should encode", function(test) { @@ -64,12 +65,12 @@ tape.test("google.protobuf.Any type", function(test) { writer = Any.encodeDelimited(any); buf = writer.finish(); - test.equal(buf[0] , 13 , "a length of 13"); + test.equal(buf[0] , 14 , "a length of 14"); test.equal(buf[1] , 1 << 3 | 2, "a tag with id 1, wire type 2"); test.equal(buf[2] , 9 , "a field length of 9"); test.equal(buf[12] , 2 << 3 | 2, "a tag with id 2, wire type 2"); - test.equal(buf[13] , 0 , "a field length of 0"); - test.equal(buf.length, 14 , "14 bytes in total"); + test.equal(buf[13] , 1 , "a field length of 1"); + test.equal(buf.length, 15 , "15 bytes in total"); test.end(); }); diff --git a/tests/classes.js b/tests/classes.js index 836a2401d..d10af7ea7 100644 --- a/tests/classes.js +++ b/tests/classes.js @@ -17,7 +17,8 @@ tape.test("google.protobuf.Any class", function(test) { } /* Any.prototype = */ Class.create(root.lookup("google.protobuf.Any"), Any); - var valueBuffer = protobuf.util.newBuffer(0); + var valueBuffer = protobuf.util.newBuffer(1); + valueBuffer[0] = 0; var any = new Any({ type_url: "some.type", value: valueBuffer @@ -41,8 +42,8 @@ tape.test("google.protobuf.Any class", function(test) { test.equal(buf[0] , 1 << 3 | 2, "a tag with id 1, wire type 2"); test.equal(buf[1] , 9 , "a field length of 9"); test.equal(buf[11] , 2 << 3 | 2, "a tag with id 2, wire type 2"); - test.equal(buf[12] , 0 , "a field length of 0"); - test.equal(buf.length, 13 , "13 bytes in total"); + test.equal(buf[12] , 1 , "a field length of 1"); + test.equal(buf.length, 14 , "14 bytes in total"); test.end(); }); @@ -60,12 +61,12 @@ tape.test("google.protobuf.Any class", function(test) { buf = Any.encodeDelimited(any).finish(); - test.equal(buf[0] , 13 , "a length of 13"); + test.equal(buf[0] , 14 , "a length of 14"); test.equal(buf[1] , 1 << 3 | 2, "a tag with id 1, wire type 2"); test.equal(buf[2] , 9 , "a field length of 9"); test.equal(buf[12] , 2 << 3 | 2, "a tag with id 2, wire type 2"); - test.equal(buf[13] , 0 , "a field length of 0"); - test.equal(buf.length, 14 , "14 bytes in total"); + test.equal(buf[13] , 1 , "a field length of 1"); + test.equal(buf.length, 15 , "15 bytes in total"); test.end(); }); diff --git a/tests/data/test.d.ts b/tests/data/test.d.ts index fbfe563aa..741936d34 100644 --- a/tests/data/test.d.ts +++ b/tests/data/test.d.ts @@ -1,5 +1,5 @@ // $> pbts --out tests/data/test.d.ts --no-comments tests/data/test.js -// Generated Mon, 02 Jan 2017 04:51:34 UTC +// Generated Mon, 02 Jan 2017 15:20:55 UTC import * as $protobuf from "../.."; diff --git a/tests/data/test.js b/tests/data/test.js index 00bff9376..42c812c02 100644 --- a/tests/data/test.js +++ b/tests/data/test.js @@ -2791,7 +2791,7 @@ $root.jspb = (function() { * DefaultValues bytesField. * @type {Uint8Array} */ - $prototype.bytesField = "moo"; + $prototype.bytesField = $protobuf.util.emptyObject; // Referenced types var $types = [null, null, null, "jspb.test.DefaultValues.Enum", null, null]; $lazyTypes.push($types); @@ -2831,7 +2831,7 @@ $root.jspb = (function() { if (message.emptyField !== undefined && message.emptyField !== "") { writer.uint32(50).string(message.emptyField); } - if (message.bytesField !== undefined && message.bytesField !== "moo") { + if (message.bytesField && message.bytesField.length && util.arrayNe(message.bytesField, [ 109, 111, 111 ])) { writer.uint32(66).bytes(message.bytesField); } return writer; @@ -2974,7 +2974,7 @@ $root.jspb = (function() { if (dst.emptyField === undefined && options.defaults) { dst.emptyField = ""; } - dst.bytesField = impl.bytes(src.bytesField, "moo", options); + dst.bytesField = impl.bytes(src.bytesField, [ 109, 111, 111 ], options); } return dst; };})($types); @@ -3436,7 +3436,7 @@ $root.jspb = (function() { types[2].encode(message.simple2[i], writer.uint32(42).fork()).ldelim(); } } - if (message.bytesField !== undefined && message.bytesField !== []) { + if (message.bytesField && message.bytesField.length) { writer.uint32(50).bytes(message.bytesField); } if (message.unused !== undefined && message.unused !== "") { @@ -4801,7 +4801,7 @@ $root.jspb = (function() { if (message.value !== undefined && message.value !== 0) { writer.uint32(8).int32(message.value); } - if (message.data !== undefined && message.data !== []) { + if (message.data && message.data.length) { writer.uint32(18).bytes(message.data); } return writer; @@ -11433,7 +11433,7 @@ $root.google = (function() { if (message.doubleValue !== undefined && message.doubleValue !== 0) { writer.uint32(49).double(message.doubleValue); } - if (message.stringValue !== undefined && message.stringValue !== []) { + if (message.stringValue && message.stringValue.length) { writer.uint32(58).bytes(message.stringValue); } if (message.aggregateValue !== undefined && message.aggregateValue !== "") {