2 * protobuf.js v6.10.0 (c) 2016, daniel wirtz
3 * compiled wed, 15 jul 2020 23:34:13 utc
4 * licensed under the bsd-3-clause license
5 * see: https://github.com/dcodeio/protobuf.js for details
7 (function(undefined){"use strict";(function prelude(modules, cache, entries) {
9 // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS
10 // sources through a conflict-free require shim and is again wrapped within an iife that
11 // provides a minification-friendly `undefined` var plus a global "use strict" directive
12 // so that minification can remove the directives of each module.
14 function $require(name) {
15 var $module = cache[name];
17 modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);
18 return $module.exports;
21 var protobuf = $require(entries[0]);
24 protobuf.util.global.protobuf = protobuf;
27 if (typeof define === "function" && define.amd)
28 define(["long"], function(Long) {
29 if (Long && Long.isLong) {
30 protobuf.util.Long = Long;
36 // Be nice to CommonJS
37 if (typeof module === "object" && module && module.exports)
38 module.exports = protobuf;
40 })/* end of prelude */({1:[function(require,module,exports){
42 module.exports = asPromise;
\r
45 * Callback as used by {@link util.asPromise}.
\r
46 * @typedef asPromiseCallback
\r
48 * @param {Error|null} error Error, if any
\r
49 * @param {...*} params Additional arguments
\r
50 * @returns {undefined}
\r
54 * Returns a promise from a node-style callback function.
\r
56 * @param {asPromiseCallback} fn Function to call
\r
57 * @param {*} ctx Function context
\r
58 * @param {...*} params Function arguments
\r
59 * @returns {Promise<*>} Promisified function
\r
61 function asPromise(fn, ctx/*, varargs */) {
\r
62 var params = new Array(arguments.length - 1),
\r
66 while (index < arguments.length)
\r
67 params[offset++] = arguments[index++];
\r
68 return new Promise(function executor(resolve, reject) {
\r
69 params[offset] = function callback(err/*, varargs */) {
\r
75 var params = new Array(arguments.length - 1),
\r
77 while (offset < params.length)
\r
78 params[offset++] = arguments[offset];
\r
79 resolve.apply(null, params);
\r
84 fn.apply(ctx || null, params);
\r
94 },{}],2:[function(require,module,exports){
98 * A minimal base64 implementation for number arrays.
\r
102 var base64 = exports;
\r
105 * Calculates the byte length of a base64 encoded string.
\r
106 * @param {string} string Base64 encoded string
\r
107 * @returns {number} Byte length
\r
109 base64.length = function length(string) {
\r
110 var p = string.length;
\r
114 while (--p % 4 > 1 && string.charAt(p) === "=")
\r
116 return Math.ceil(string.length * 3) / 4 - n;
\r
119 // Base64 encoding table
\r
120 var b64 = new Array(64);
\r
122 // Base64 decoding table
\r
123 var s64 = new Array(123);
\r
125 // 65..90, 97..122, 48..57, 43, 47
\r
126 for (var i = 0; i < 64;)
\r
127 s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
\r
130 * Encodes a buffer to a base64 encoded string.
\r
131 * @param {Uint8Array} buffer Source buffer
\r
132 * @param {number} start Source start
\r
133 * @param {number} end Source end
\r
134 * @returns {string} Base64 encoded string
\r
136 base64.encode = function encode(buffer, start, end) {
\r
139 var i = 0, // output index
\r
140 j = 0, // goto index
\r
142 while (start < end) {
\r
143 var b = buffer[start++];
\r
146 chunk[i++] = b64[b >> 2];
\r
151 chunk[i++] = b64[t | b >> 4];
\r
156 chunk[i++] = b64[t | b >> 6];
\r
157 chunk[i++] = b64[b & 63];
\r
162 (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
\r
167 chunk[i++] = b64[t];
\r
174 parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
\r
175 return parts.join("");
\r
177 return String.fromCharCode.apply(String, chunk.slice(0, i));
\r
180 var invalidEncoding = "invalid encoding";
\r
183 * Decodes a base64 encoded string to a buffer.
\r
184 * @param {string} string Source string
\r
185 * @param {Uint8Array} buffer Destination buffer
\r
186 * @param {number} offset Destination offset
\r
187 * @returns {number} Number of bytes written
\r
188 * @throws {Error} If encoding is invalid
\r
190 base64.decode = function decode(string, buffer, offset) {
\r
191 var start = offset;
\r
192 var j = 0, // goto index
\r
194 for (var i = 0; i < string.length;) {
\r
195 var c = string.charCodeAt(i++);
\r
196 if (c === 61 && j > 1)
\r
198 if ((c = s64[c]) === undefined)
\r
199 throw Error(invalidEncoding);
\r
206 buffer[offset++] = t << 2 | (c & 48) >> 4;
\r
211 buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
\r
216 buffer[offset++] = (t & 3) << 6 | c;
\r
222 throw Error(invalidEncoding);
\r
223 return offset - start;
\r
227 * Tests if the specified string appears to be base64 encoded.
\r
228 * @param {string} string String to test
\r
229 * @returns {boolean} `true` if probably base64 encoded, otherwise false
\r
231 base64.test = function test(string) {
\r
232 return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
\r
235 },{}],3:[function(require,module,exports){
237 module.exports = EventEmitter;
\r
240 * Constructs a new event emitter instance.
\r
241 * @classdesc A minimal event emitter.
\r
245 function EventEmitter() {
\r
248 * Registered listeners.
\r
249 * @type {Object.<string,*>}
\r
252 this._listeners = {};
\r
256 * Registers an event listener.
\r
257 * @param {string} evt Event name
\r
258 * @param {function} fn Listener
\r
259 * @param {*} [ctx] Listener context
\r
260 * @returns {util.EventEmitter} `this`
\r
262 EventEmitter.prototype.on = function on(evt, fn, ctx) {
\r
263 (this._listeners[evt] || (this._listeners[evt] = [])).push({
\r
271 * Removes an event listener or any matching listeners if arguments are omitted.
\r
272 * @param {string} [evt] Event name. Removes all listeners if omitted.
\r
273 * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
\r
274 * @returns {util.EventEmitter} `this`
\r
276 EventEmitter.prototype.off = function off(evt, fn) {
\r
277 if (evt === undefined)
\r
278 this._listeners = {};
\r
280 if (fn === undefined)
\r
281 this._listeners[evt] = [];
\r
283 var listeners = this._listeners[evt];
\r
284 for (var i = 0; i < listeners.length;)
\r
285 if (listeners[i].fn === fn)
\r
286 listeners.splice(i, 1);
\r
295 * Emits an event by calling its listeners with the specified arguments.
\r
296 * @param {string} evt Event name
\r
297 * @param {...*} args Arguments
\r
298 * @returns {util.EventEmitter} `this`
\r
300 EventEmitter.prototype.emit = function emit(evt) {
\r
301 var listeners = this._listeners[evt];
\r
305 for (; i < arguments.length;)
\r
306 args.push(arguments[i++]);
\r
307 for (i = 0; i < listeners.length;)
\r
308 listeners[i].fn.apply(listeners[i++].ctx, args);
\r
313 },{}],4:[function(require,module,exports){
316 module.exports = factory(factory);
\r
319 * Reads / writes floats / doubles from / to buffers.
\r
325 * Writes a 32 bit float to a buffer using little endian byte order.
\r
326 * @name util.float.writeFloatLE
\r
328 * @param {number} val Value to write
\r
329 * @param {Uint8Array} buf Target buffer
\r
330 * @param {number} pos Target buffer offset
\r
331 * @returns {undefined}
\r
335 * Writes a 32 bit float to a buffer using big endian byte order.
\r
336 * @name util.float.writeFloatBE
\r
338 * @param {number} val Value to write
\r
339 * @param {Uint8Array} buf Target buffer
\r
340 * @param {number} pos Target buffer offset
\r
341 * @returns {undefined}
\r
345 * Reads a 32 bit float from a buffer using little endian byte order.
\r
346 * @name util.float.readFloatLE
\r
348 * @param {Uint8Array} buf Source buffer
\r
349 * @param {number} pos Source buffer offset
\r
350 * @returns {number} Value read
\r
354 * Reads a 32 bit float from a buffer using big endian byte order.
\r
355 * @name util.float.readFloatBE
\r
357 * @param {Uint8Array} buf Source buffer
\r
358 * @param {number} pos Source buffer offset
\r
359 * @returns {number} Value read
\r
363 * Writes a 64 bit double to a buffer using little endian byte order.
\r
364 * @name util.float.writeDoubleLE
\r
366 * @param {number} val Value to write
\r
367 * @param {Uint8Array} buf Target buffer
\r
368 * @param {number} pos Target buffer offset
\r
369 * @returns {undefined}
\r
373 * Writes a 64 bit double to a buffer using big endian byte order.
\r
374 * @name util.float.writeDoubleBE
\r
376 * @param {number} val Value to write
\r
377 * @param {Uint8Array} buf Target buffer
\r
378 * @param {number} pos Target buffer offset
\r
379 * @returns {undefined}
\r
383 * Reads a 64 bit double from a buffer using little endian byte order.
\r
384 * @name util.float.readDoubleLE
\r
386 * @param {Uint8Array} buf Source buffer
\r
387 * @param {number} pos Source buffer offset
\r
388 * @returns {number} Value read
\r
392 * Reads a 64 bit double from a buffer using big endian byte order.
\r
393 * @name util.float.readDoubleBE
\r
395 * @param {Uint8Array} buf Source buffer
\r
396 * @param {number} pos Source buffer offset
\r
397 * @returns {number} Value read
\r
400 // Factory function for the purpose of node-based testing in modified global environments
\r
401 function factory(exports) {
\r
403 // float: typed array
\r
404 if (typeof Float32Array !== "undefined") (function() {
\r
406 var f32 = new Float32Array([ -0 ]),
\r
407 f8b = new Uint8Array(f32.buffer),
\r
408 le = f8b[3] === 128;
\r
410 function writeFloat_f32_cpy(val, buf, pos) {
\r
412 buf[pos ] = f8b[0];
\r
413 buf[pos + 1] = f8b[1];
\r
414 buf[pos + 2] = f8b[2];
\r
415 buf[pos + 3] = f8b[3];
\r
418 function writeFloat_f32_rev(val, buf, pos) {
\r
420 buf[pos ] = f8b[3];
\r
421 buf[pos + 1] = f8b[2];
\r
422 buf[pos + 2] = f8b[1];
\r
423 buf[pos + 3] = f8b[0];
\r
426 /* istanbul ignore next */
\r
427 exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
\r
428 /* istanbul ignore next */
\r
429 exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
\r
431 function readFloat_f32_cpy(buf, pos) {
\r
432 f8b[0] = buf[pos ];
\r
433 f8b[1] = buf[pos + 1];
\r
434 f8b[2] = buf[pos + 2];
\r
435 f8b[3] = buf[pos + 3];
\r
439 function readFloat_f32_rev(buf, pos) {
\r
440 f8b[3] = buf[pos ];
\r
441 f8b[2] = buf[pos + 1];
\r
442 f8b[1] = buf[pos + 2];
\r
443 f8b[0] = buf[pos + 3];
\r
447 /* istanbul ignore next */
\r
448 exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
\r
449 /* istanbul ignore next */
\r
450 exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
\r
453 })(); else (function() {
\r
455 function writeFloat_ieee754(writeUint, val, buf, pos) {
\r
456 var sign = val < 0 ? 1 : 0;
\r
460 writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);
\r
461 else if (isNaN(val))
\r
462 writeUint(2143289344, buf, pos);
\r
463 else if (val > 3.4028234663852886e+38) // +-Infinity
\r
464 writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
\r
465 else if (val < 1.1754943508222875e-38) // denormal
\r
466 writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
\r
468 var exponent = Math.floor(Math.log(val) / Math.LN2),
\r
469 mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
\r
470 writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
\r
474 exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
\r
475 exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
\r
477 function readFloat_ieee754(readUint, buf, pos) {
\r
478 var uint = readUint(buf, pos),
\r
479 sign = (uint >> 31) * 2 + 1,
\r
480 exponent = uint >>> 23 & 255,
\r
481 mantissa = uint & 8388607;
\r
482 return exponent === 255
\r
486 : exponent === 0 // denormal
\r
487 ? sign * 1.401298464324817e-45 * mantissa
\r
488 : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
\r
491 exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
\r
492 exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
\r
496 // double: typed array
\r
497 if (typeof Float64Array !== "undefined") (function() {
\r
499 var f64 = new Float64Array([-0]),
\r
500 f8b = new Uint8Array(f64.buffer),
\r
501 le = f8b[7] === 128;
\r
503 function writeDouble_f64_cpy(val, buf, pos) {
\r
505 buf[pos ] = f8b[0];
\r
506 buf[pos + 1] = f8b[1];
\r
507 buf[pos + 2] = f8b[2];
\r
508 buf[pos + 3] = f8b[3];
\r
509 buf[pos + 4] = f8b[4];
\r
510 buf[pos + 5] = f8b[5];
\r
511 buf[pos + 6] = f8b[6];
\r
512 buf[pos + 7] = f8b[7];
\r
515 function writeDouble_f64_rev(val, buf, pos) {
\r
517 buf[pos ] = f8b[7];
\r
518 buf[pos + 1] = f8b[6];
\r
519 buf[pos + 2] = f8b[5];
\r
520 buf[pos + 3] = f8b[4];
\r
521 buf[pos + 4] = f8b[3];
\r
522 buf[pos + 5] = f8b[2];
\r
523 buf[pos + 6] = f8b[1];
\r
524 buf[pos + 7] = f8b[0];
\r
527 /* istanbul ignore next */
\r
528 exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
\r
529 /* istanbul ignore next */
\r
530 exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
\r
532 function readDouble_f64_cpy(buf, pos) {
\r
533 f8b[0] = buf[pos ];
\r
534 f8b[1] = buf[pos + 1];
\r
535 f8b[2] = buf[pos + 2];
\r
536 f8b[3] = buf[pos + 3];
\r
537 f8b[4] = buf[pos + 4];
\r
538 f8b[5] = buf[pos + 5];
\r
539 f8b[6] = buf[pos + 6];
\r
540 f8b[7] = buf[pos + 7];
\r
544 function readDouble_f64_rev(buf, pos) {
\r
545 f8b[7] = buf[pos ];
\r
546 f8b[6] = buf[pos + 1];
\r
547 f8b[5] = buf[pos + 2];
\r
548 f8b[4] = buf[pos + 3];
\r
549 f8b[3] = buf[pos + 4];
\r
550 f8b[2] = buf[pos + 5];
\r
551 f8b[1] = buf[pos + 6];
\r
552 f8b[0] = buf[pos + 7];
\r
556 /* istanbul ignore next */
\r
557 exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
\r
558 /* istanbul ignore next */
\r
559 exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
\r
562 })(); else (function() {
\r
564 function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
\r
565 var sign = val < 0 ? 1 : 0;
\r
569 writeUint(0, buf, pos + off0);
\r
570 writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);
\r
571 } else if (isNaN(val)) {
\r
572 writeUint(0, buf, pos + off0);
\r
573 writeUint(2146959360, buf, pos + off1);
\r
574 } else if (val > 1.7976931348623157e+308) { // +-Infinity
\r
575 writeUint(0, buf, pos + off0);
\r
576 writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
\r
579 if (val < 2.2250738585072014e-308) { // denormal
\r
580 mantissa = val / 5e-324;
\r
581 writeUint(mantissa >>> 0, buf, pos + off0);
\r
582 writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
\r
584 var exponent = Math.floor(Math.log(val) / Math.LN2);
\r
585 if (exponent === 1024)
\r
587 mantissa = val * Math.pow(2, -exponent);
\r
588 writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
\r
589 writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
\r
594 exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
\r
595 exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
\r
597 function readDouble_ieee754(readUint, off0, off1, buf, pos) {
\r
598 var lo = readUint(buf, pos + off0),
\r
599 hi = readUint(buf, pos + off1);
\r
600 var sign = (hi >> 31) * 2 + 1,
\r
601 exponent = hi >>> 20 & 2047,
\r
602 mantissa = 4294967296 * (hi & 1048575) + lo;
\r
603 return exponent === 2047
\r
607 : exponent === 0 // denormal
\r
608 ? sign * 5e-324 * mantissa
\r
609 : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
\r
612 exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
\r
613 exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
\r
622 function writeUintLE(val, buf, pos) {
\r
623 buf[pos ] = val & 255;
\r
624 buf[pos + 1] = val >>> 8 & 255;
\r
625 buf[pos + 2] = val >>> 16 & 255;
\r
626 buf[pos + 3] = val >>> 24;
\r
629 function writeUintBE(val, buf, pos) {
\r
630 buf[pos ] = val >>> 24;
\r
631 buf[pos + 1] = val >>> 16 & 255;
\r
632 buf[pos + 2] = val >>> 8 & 255;
\r
633 buf[pos + 3] = val & 255;
\r
636 function readUintLE(buf, pos) {
\r
638 | buf[pos + 1] << 8
\r
639 | buf[pos + 2] << 16
\r
640 | buf[pos + 3] << 24) >>> 0;
\r
643 function readUintBE(buf, pos) {
\r
644 return (buf[pos ] << 24
\r
645 | buf[pos + 1] << 16
\r
646 | buf[pos + 2] << 8
\r
647 | buf[pos + 3]) >>> 0;
\r
650 },{}],5:[function(require,module,exports){
652 module.exports = inquire;
\r
655 * Requires a module only if available.
\r
657 * @param {string} moduleName Module to require
\r
658 * @returns {?Object} Required module if available and not empty, otherwise `null`
\r
660 function inquire(moduleName) {
\r
662 var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
\r
663 if (mod && (mod.length || Object.keys(mod).length))
\r
665 } catch (e) {} // eslint-disable-line no-empty
\r
669 },{}],6:[function(require,module,exports){
671 module.exports = pool;
\r
674 * An allocator as used by {@link util.pool}.
\r
675 * @typedef PoolAllocator
\r
677 * @param {number} size Buffer size
\r
678 * @returns {Uint8Array} Buffer
\r
682 * A slicer as used by {@link util.pool}.
\r
683 * @typedef PoolSlicer
\r
685 * @param {number} start Start offset
\r
686 * @param {number} end End offset
\r
687 * @returns {Uint8Array} Buffer slice
\r
688 * @this {Uint8Array}
\r
692 * A general purpose buffer pool.
\r
695 * @param {PoolAllocator} alloc Allocator
\r
696 * @param {PoolSlicer} slice Slicer
\r
697 * @param {number} [size=8192] Slab size
\r
698 * @returns {PoolAllocator} Pooled allocator
\r
700 function pool(alloc, slice, size) {
\r
701 var SIZE = size || 8192;
\r
702 var MAX = SIZE >>> 1;
\r
705 return function pool_alloc(size) {
\r
706 if (size < 1 || size > MAX)
\r
707 return alloc(size);
\r
708 if (offset + size > SIZE) {
\r
709 slab = alloc(SIZE);
\r
712 var buf = slice.call(slab, offset, offset += size);
\r
713 if (offset & 7) // align to 32 bit
\r
714 offset = (offset | 7) + 1;
\r
719 },{}],7:[function(require,module,exports){
723 * A minimal UTF8 implementation for number arrays.
\r
727 var utf8 = exports;
\r
730 * Calculates the UTF8 byte length of a string.
\r
731 * @param {string} string String
\r
732 * @returns {number} Byte length
\r
734 utf8.length = function utf8_length(string) {
\r
737 for (var i = 0; i < string.length; ++i) {
\r
738 c = string.charCodeAt(i);
\r
743 else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
\r
753 * Reads UTF8 bytes as a string.
\r
754 * @param {Uint8Array} buffer Source buffer
\r
755 * @param {number} start Source start
\r
756 * @param {number} end Source end
\r
757 * @returns {string} String read
\r
759 utf8.read = function utf8_read(buffer, start, end) {
\r
760 var len = end - start;
\r
765 i = 0, // char offset
\r
767 while (start < end) {
\r
768 t = buffer[start++];
\r
771 else if (t > 191 && t < 224)
\r
772 chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
\r
773 else if (t > 239 && t < 365) {
\r
774 t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
\r
775 chunk[i++] = 0xD800 + (t >> 10);
\r
776 chunk[i++] = 0xDC00 + (t & 1023);
\r
778 chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
\r
780 (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
\r
786 parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
\r
787 return parts.join("");
\r
789 return String.fromCharCode.apply(String, chunk.slice(0, i));
\r
793 * Writes a string as UTF8 bytes.
\r
794 * @param {string} string Source string
\r
795 * @param {Uint8Array} buffer Destination buffer
\r
796 * @param {number} offset Destination offset
\r
797 * @returns {number} Bytes written
\r
799 utf8.write = function utf8_write(string, buffer, offset) {
\r
800 var start = offset,
\r
803 for (var i = 0; i < string.length; ++i) {
\r
804 c1 = string.charCodeAt(i);
\r
806 buffer[offset++] = c1;
\r
807 } else if (c1 < 2048) {
\r
808 buffer[offset++] = c1 >> 6 | 192;
\r
809 buffer[offset++] = c1 & 63 | 128;
\r
810 } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
\r
811 c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
\r
813 buffer[offset++] = c1 >> 18 | 240;
\r
814 buffer[offset++] = c1 >> 12 & 63 | 128;
\r
815 buffer[offset++] = c1 >> 6 & 63 | 128;
\r
816 buffer[offset++] = c1 & 63 | 128;
\r
818 buffer[offset++] = c1 >> 12 | 224;
\r
819 buffer[offset++] = c1 >> 6 & 63 | 128;
\r
820 buffer[offset++] = c1 & 63 | 128;
\r
823 return offset - start;
\r
826 },{}],8:[function(require,module,exports){
828 var protobuf = exports;
831 * Build type, one of `"full"`, `"light"` or `"minimal"`.
836 protobuf.build = "minimal";
839 protobuf.Writer = require(16);
840 protobuf.BufferWriter = require(17);
841 protobuf.Reader = require(9);
842 protobuf.BufferReader = require(10);
845 protobuf.util = require(15);
846 protobuf.rpc = require(12);
847 protobuf.roots = require(11);
848 protobuf.configure = configure;
850 /* istanbul ignore next */
852 * Reconfigures the library according to the environment.
853 * @returns {undefined}
855 function configure() {
856 protobuf.util._configure();
857 protobuf.Writer._configure(protobuf.BufferWriter);
858 protobuf.Reader._configure(protobuf.BufferReader);
861 // Set up buffer utility according to the environment
864 },{"10":10,"11":11,"12":12,"15":15,"16":16,"17":17,"9":9}],9:[function(require,module,exports){
866 module.exports = Reader;
868 var util = require(15);
870 var BufferReader; // cyclic
872 var LongBits = util.LongBits,
875 /* istanbul ignore next */
876 function indexOutOfRange(reader, writeLength) {
877 return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
881 * Constructs a new reader instance using the specified buffer.
882 * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.
884 * @param {Uint8Array} buffer Buffer to read from
886 function Reader(buffer) {
895 * Read buffer position.
901 * Read buffer length.
904 this.len = buffer.length;
907 var create_array = typeof Uint8Array !== "undefined"
908 ? function create_typed_array(buffer) {
909 if (buffer instanceof Uint8Array || Array.isArray(buffer))
910 return new Reader(buffer);
911 throw Error("illegal buffer");
913 /* istanbul ignore next */
914 : function create_array(buffer) {
915 if (Array.isArray(buffer))
916 return new Reader(buffer);
917 throw Error("illegal buffer");
920 var create = function create() {
922 ? function create_buffer_setup(buffer) {
923 return (Reader.create = function create_buffer(buffer) {
924 return util.Buffer.isBuffer(buffer)
925 ? new BufferReader(buffer)
926 /* istanbul ignore next */
927 : create_array(buffer);
930 /* istanbul ignore next */
935 * Creates a new reader using the specified buffer.
937 * @param {Uint8Array|Buffer} buffer Buffer to read from
938 * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}
939 * @throws {Error} If `buffer` is not a valid buffer
941 Reader.create = create();
943 Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;
946 * Reads a varint as an unsigned 32 bit value.
948 * @returns {number} Value read
950 Reader.prototype.uint32 = (function read_uint32_setup() {
951 var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)
952 return function read_uint32() {
953 value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;
954 value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;
955 value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;
956 value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;
957 value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;
959 /* istanbul ignore if */
960 if ((this.pos += 5) > this.len) {
962 throw indexOutOfRange(this, 10);
969 * Reads a varint as a signed 32 bit value.
970 * @returns {number} Value read
972 Reader.prototype.int32 = function read_int32() {
973 return this.uint32() | 0;
977 * Reads a zig-zag encoded varint as a signed 32 bit value.
978 * @returns {number} Value read
980 Reader.prototype.sint32 = function read_sint32() {
981 var value = this.uint32();
982 return value >>> 1 ^ -(value & 1) | 0;
985 /* eslint-disable no-invalid-this */
987 function readLongVarint() {
988 // tends to deopt with local vars for octet etc.
989 var bits = new LongBits(0, 0);
991 if (this.len - this.pos > 4) { // fast route (lo)
994 bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
995 if (this.buf[this.pos++] < 128)
999 bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1000 bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1001 if (this.buf[this.pos++] < 128)
1005 for (; i < 3; ++i) {
1006 /* istanbul ignore if */
1007 if (this.pos >= this.len)
1008 throw indexOutOfRange(this);
1010 bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1011 if (this.buf[this.pos++] < 128)
1015 bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1018 if (this.len - this.pos > 4) { // fast route (hi)
1019 for (; i < 5; ++i) {
1021 bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1022 if (this.buf[this.pos++] < 128)
1026 for (; i < 5; ++i) {
1027 /* istanbul ignore if */
1028 if (this.pos >= this.len)
1029 throw indexOutOfRange(this);
1031 bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1032 if (this.buf[this.pos++] < 128)
1036 /* istanbul ignore next */
1037 throw Error("invalid varint encoding");
1040 /* eslint-enable no-invalid-this */
1043 * Reads a varint as a signed 64 bit value.
1044 * @name Reader#int64
1046 * @returns {Long} Value read
1050 * Reads a varint as an unsigned 64 bit value.
1051 * @name Reader#uint64
1053 * @returns {Long} Value read
1057 * Reads a zig-zag encoded varint as a signed 64 bit value.
1058 * @name Reader#sint64
1060 * @returns {Long} Value read
1064 * Reads a varint as a boolean.
1065 * @returns {boolean} Value read
1067 Reader.prototype.bool = function read_bool() {
1068 return this.uint32() !== 0;
1071 function readFixed32_end(buf, end) { // note that this uses `end`, not `pos`
1072 return (buf[end - 4]
1074 | buf[end - 2] << 16
1075 | buf[end - 1] << 24) >>> 0;
1079 * Reads fixed 32 bits as an unsigned 32 bit integer.
1080 * @returns {number} Value read
1082 Reader.prototype.fixed32 = function read_fixed32() {
1084 /* istanbul ignore if */
1085 if (this.pos + 4 > this.len)
1086 throw indexOutOfRange(this, 4);
1088 return readFixed32_end(this.buf, this.pos += 4);
1092 * Reads fixed 32 bits as a signed 32 bit integer.
1093 * @returns {number} Value read
1095 Reader.prototype.sfixed32 = function read_sfixed32() {
1097 /* istanbul ignore if */
1098 if (this.pos + 4 > this.len)
1099 throw indexOutOfRange(this, 4);
1101 return readFixed32_end(this.buf, this.pos += 4) | 0;
1104 /* eslint-disable no-invalid-this */
1106 function readFixed64(/* this: Reader */) {
1108 /* istanbul ignore if */
1109 if (this.pos + 8 > this.len)
1110 throw indexOutOfRange(this, 8);
1112 return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
1115 /* eslint-enable no-invalid-this */
1118 * Reads fixed 64 bits.
1119 * @name Reader#fixed64
1121 * @returns {Long} Value read
1125 * Reads zig-zag encoded fixed 64 bits.
1126 * @name Reader#sfixed64
1128 * @returns {Long} Value read
1132 * Reads a float (32 bit) as a number.
1134 * @returns {number} Value read
1136 Reader.prototype.float = function read_float() {
1138 /* istanbul ignore if */
1139 if (this.pos + 4 > this.len)
1140 throw indexOutOfRange(this, 4);
1142 var value = util.float.readFloatLE(this.buf, this.pos);
1148 * Reads a double (64 bit float) as a number.
1150 * @returns {number} Value read
1152 Reader.prototype.double = function read_double() {
1154 /* istanbul ignore if */
1155 if (this.pos + 8 > this.len)
1156 throw indexOutOfRange(this, 4);
1158 var value = util.float.readDoubleLE(this.buf, this.pos);
1164 * Reads a sequence of bytes preceeded by its length as a varint.
1165 * @returns {Uint8Array} Value read
1167 Reader.prototype.bytes = function read_bytes() {
1168 var length = this.uint32(),
1170 end = this.pos + length;
1172 /* istanbul ignore if */
1174 throw indexOutOfRange(this, length);
1177 if (Array.isArray(this.buf)) // plain array
1178 return this.buf.slice(start, end);
1179 return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
1180 ? new this.buf.constructor(0)
1181 : this._slice.call(this.buf, start, end);
1185 * Reads a string preceeded by its byte length as a varint.
1186 * @returns {string} Value read
1188 Reader.prototype.string = function read_string() {
1189 var bytes = this.bytes();
1190 return utf8.read(bytes, 0, bytes.length);
1194 * Skips the specified number of bytes if specified, otherwise skips a varint.
1195 * @param {number} [length] Length if known, otherwise a varint is assumed
1196 * @returns {Reader} `this`
1198 Reader.prototype.skip = function skip(length) {
1199 if (typeof length === "number") {
1200 /* istanbul ignore if */
1201 if (this.pos + length > this.len)
1202 throw indexOutOfRange(this, length);
1206 /* istanbul ignore if */
1207 if (this.pos >= this.len)
1208 throw indexOutOfRange(this);
1209 } while (this.buf[this.pos++] & 128);
1215 * Skips the next element of the specified wire type.
1216 * @param {number} wireType Wire type received
1217 * @returns {Reader} `this`
1219 Reader.prototype.skipType = function(wireType) {
1228 this.skip(this.uint32());
1231 while ((wireType = this.uint32() & 7) !== 4) {
1232 this.skipType(wireType);
1239 /* istanbul ignore next */
1241 throw Error("invalid wire type " + wireType + " at offset " + this.pos);
1246 Reader._configure = function(BufferReader_) {
1247 BufferReader = BufferReader_;
1248 Reader.create = create();
1249 BufferReader._configure();
1251 var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber";
1252 util.merge(Reader.prototype, {
1254 int64: function read_int64() {
1255 return readLongVarint.call(this)[fn](false);
1258 uint64: function read_uint64() {
1259 return readLongVarint.call(this)[fn](true);
1262 sint64: function read_sint64() {
1263 return readLongVarint.call(this).zzDecode()[fn](false);
1266 fixed64: function read_fixed64() {
1267 return readFixed64.call(this)[fn](true);
1270 sfixed64: function read_sfixed64() {
1271 return readFixed64.call(this)[fn](false);
1277 },{"15":15}],10:[function(require,module,exports){
1279 module.exports = BufferReader;
1282 var Reader = require(9);
1283 (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
1285 var util = require(15);
1288 * Constructs a new buffer reader instance.
1289 * @classdesc Wire format reader using node buffers.
1292 * @param {Buffer} buffer Buffer to read from
1294 function BufferReader(buffer) {
1295 Reader.call(this, buffer);
1299 * @name BufferReader#buf
1304 BufferReader._configure = function () {
1305 /* istanbul ignore else */
1307 BufferReader.prototype._slice = util.Buffer.prototype.slice;
1314 BufferReader.prototype.string = function read_string_buffer() {
1315 var len = this.uint32(); // modifies pos
1316 return this.buf.utf8Slice
1317 ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))
1318 : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
1322 * Reads a sequence of bytes preceeded by its length as a varint.
1323 * @name BufferReader#bytes
1325 * @returns {Buffer} Value read
1328 BufferReader._configure();
1330 },{"15":15,"9":9}],11:[function(require,module,exports){
1332 module.exports = {};
1336 * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).
1337 * Can also be used manually to make roots available accross modules.
1339 * @type {Object.<string,Root>}
1341 * // pbjs -r myroot -o compiled.js ...
1343 * // in another module:
1344 * require("./compiled.js");
1346 * // in any subsequent module:
1347 * var root = protobuf.roots["myroot"];
1350 },{}],12:[function(require,module,exports){
1354 * Streaming RPC helpers.
1360 * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
1363 * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called
1364 * @param {Uint8Array} requestData Request data
1365 * @param {RPCImplCallback} callback Callback function
1366 * @returns {undefined}
1368 * function rpcImpl(method, requestData, callback) {
1369 * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
1370 * throw Error("no such method");
1371 * asynchronouslyObtainAResponse(requestData, function(err, responseData) {
1372 * callback(err, responseData);
1378 * Node-style callback as used by {@link RPCImpl}.
1379 * @typedef RPCImplCallback
1381 * @param {Error|null} error Error, if any, otherwise `null`
1382 * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
1383 * @returns {undefined}
1386 rpc.Service = require(13);
1388 },{"13":13}],13:[function(require,module,exports){
1390 module.exports = Service;
1392 var util = require(15);
1394 // Extends EventEmitter
1395 (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
1398 * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.
1400 * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.
1401 * @typedef rpc.ServiceMethodCallback
1402 * @template TRes extends Message<TRes>
1404 * @param {Error|null} error Error, if any
1405 * @param {TRes} [response] Response message
1406 * @returns {undefined}
1410 * A service method part of a {@link rpc.Service} as created by {@link Service.create}.
1411 * @typedef rpc.ServiceMethod
1412 * @template TReq extends Message<TReq>
1413 * @template TRes extends Message<TRes>
1415 * @param {TReq|Properties<TReq>} request Request message or plain object
1416 * @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message
1417 * @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`
1421 * Constructs a new RPC service instance.
1422 * @classdesc An RPC service as returned by {@link Service#create}.
1423 * @exports rpc.Service
1424 * @extends util.EventEmitter
1426 * @param {RPCImpl} rpcImpl RPC implementation
1427 * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
1428 * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
1430 function Service(rpcImpl, requestDelimited, responseDelimited) {
1432 if (typeof rpcImpl !== "function")
1433 throw TypeError("rpcImpl must be a function");
1435 util.EventEmitter.call(this);
1438 * RPC implementation. Becomes `null` once the service is ended.
1439 * @type {RPCImpl|null}
1441 this.rpcImpl = rpcImpl;
1444 * Whether requests are length-delimited.
1447 this.requestDelimited = Boolean(requestDelimited);
1450 * Whether responses are length-delimited.
1453 this.responseDelimited = Boolean(responseDelimited);
1457 * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.
1458 * @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method
1459 * @param {Constructor<TReq>} requestCtor Request constructor
1460 * @param {Constructor<TRes>} responseCtor Response constructor
1461 * @param {TReq|Properties<TReq>} request Request message or plain object
1462 * @param {rpc.ServiceMethodCallback<TRes>} callback Service callback
1463 * @returns {undefined}
1464 * @template TReq extends Message<TReq>
1465 * @template TRes extends Message<TRes>
1467 Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
1470 throw TypeError("request must be specified");
1474 return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);
1476 if (!self.rpcImpl) {
1477 setTimeout(function() { callback(Error("already ended")); }, 0);
1482 return self.rpcImpl(
1484 requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
1485 function rpcCallback(err, response) {
1488 self.emit("error", err, method);
1489 return callback(err);
1492 if (response === null) {
1493 self.end(/* endedByRPC */ true);
1497 if (!(response instanceof responseCtor)) {
1499 response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response);
1501 self.emit("error", err, method);
1502 return callback(err);
1506 self.emit("data", response, method);
1507 return callback(null, response);
1511 self.emit("error", err, method);
1512 setTimeout(function() { callback(err); }, 0);
1518 * Ends this service and emits the `end` event.
1519 * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.
1520 * @returns {rpc.Service} `this`
1522 Service.prototype.end = function end(endedByRPC) {
1524 if (!endedByRPC) // signal end to rpcImpl
1525 this.rpcImpl(null, null, null);
1526 this.rpcImpl = null;
1527 this.emit("end").off();
1532 },{"15":15}],14:[function(require,module,exports){
1534 module.exports = LongBits;
1536 var util = require(15);
1539 * Constructs new long bits.
1540 * @classdesc Helper class for working with the low and high bits of a 64 bit value.
1543 * @param {number} lo Low 32 bits, unsigned
1544 * @param {number} hi High 32 bits, unsigned
1546 function LongBits(lo, hi) {
1548 // note that the casts below are theoretically unnecessary as of today, but older statically
1549 // generated converter code might still call the ctor with signed 32bits. kept for compat.
1566 * @memberof util.LongBits
1567 * @type {util.LongBits}
1569 var zero = LongBits.zero = new LongBits(0, 0);
1571 zero.toNumber = function() { return 0; };
1572 zero.zzEncode = zero.zzDecode = function() { return this; };
1573 zero.length = function() { return 1; };
1577 * @memberof util.LongBits
1580 var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
1583 * Constructs new long bits from the specified number.
1584 * @param {number} value Value
1585 * @returns {util.LongBits} Instance
1587 LongBits.fromNumber = function fromNumber(value) {
1590 var sign = value < 0;
1593 var lo = value >>> 0,
1594 hi = (value - lo) / 4294967296 >>> 0;
1598 if (++lo > 4294967295) {
1600 if (++hi > 4294967295)
1604 return new LongBits(lo, hi);
1608 * Constructs new long bits from a number, long or string.
1609 * @param {Long|number|string} value Value
1610 * @returns {util.LongBits} Instance
1612 LongBits.from = function from(value) {
1613 if (typeof value === "number")
1614 return LongBits.fromNumber(value);
1615 if (util.isString(value)) {
1616 /* istanbul ignore else */
1618 value = util.Long.fromString(value);
1620 return LongBits.fromNumber(parseInt(value, 10));
1622 return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
1626 * Converts this long bits to a possibly unsafe JavaScript number.
1627 * @param {boolean} [unsigned=false] Whether unsigned or not
1628 * @returns {number} Possibly unsafe number
1630 LongBits.prototype.toNumber = function toNumber(unsigned) {
1631 if (!unsigned && this.hi >>> 31) {
1632 var lo = ~this.lo + 1 >>> 0,
1633 hi = ~this.hi >>> 0;
1636 return -(lo + hi * 4294967296);
1638 return this.lo + this.hi * 4294967296;
1642 * Converts this long bits to a long.
1643 * @param {boolean} [unsigned=false] Whether unsigned or not
1644 * @returns {Long} Long
1646 LongBits.prototype.toLong = function toLong(unsigned) {
1648 ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))
1649 /* istanbul ignore next */
1650 : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
1653 var charCodeAt = String.prototype.charCodeAt;
1656 * Constructs new long bits from the specified 8 characters long hash.
1657 * @param {string} hash Hash
1658 * @returns {util.LongBits} Bits
1660 LongBits.fromHash = function fromHash(hash) {
1661 if (hash === zeroHash)
1663 return new LongBits(
1664 ( charCodeAt.call(hash, 0)
1665 | charCodeAt.call(hash, 1) << 8
1666 | charCodeAt.call(hash, 2) << 16
1667 | charCodeAt.call(hash, 3) << 24) >>> 0
1669 ( charCodeAt.call(hash, 4)
1670 | charCodeAt.call(hash, 5) << 8
1671 | charCodeAt.call(hash, 6) << 16
1672 | charCodeAt.call(hash, 7) << 24) >>> 0
1677 * Converts this long bits to a 8 characters long hash.
1678 * @returns {string} Hash
1680 LongBits.prototype.toHash = function toHash() {
1681 return String.fromCharCode(
1683 this.lo >>> 8 & 255,
1684 this.lo >>> 16 & 255,
1687 this.hi >>> 8 & 255,
1688 this.hi >>> 16 & 255,
1694 * Zig-zag encodes this long bits.
1695 * @returns {util.LongBits} `this`
1697 LongBits.prototype.zzEncode = function zzEncode() {
1698 var mask = this.hi >> 31;
1699 this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
1700 this.lo = ( this.lo << 1 ^ mask) >>> 0;
1705 * Zig-zag decodes this long bits.
1706 * @returns {util.LongBits} `this`
1708 LongBits.prototype.zzDecode = function zzDecode() {
1709 var mask = -(this.lo & 1);
1710 this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
1711 this.hi = ( this.hi >>> 1 ^ mask) >>> 0;
1716 * Calculates the length of this longbits when encoded as a varint.
1717 * @returns {number} Length
1719 LongBits.prototype.length = function length() {
1720 var part0 = this.lo,
1721 part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,
1722 part2 = this.hi >>> 24;
1726 ? part0 < 128 ? 1 : 2
1727 : part0 < 2097152 ? 3 : 4
1729 ? part1 < 128 ? 5 : 6
1730 : part1 < 2097152 ? 7 : 8
1731 : part2 < 128 ? 9 : 10;
1734 },{"15":15}],15:[function(require,module,exports){
1738 // used to return a Promise where callback is omitted
1739 util.asPromise = require(1);
1741 // converts to / from base64 encoded strings
1742 util.base64 = require(2);
1744 // base class of rpc.Service
1745 util.EventEmitter = require(3);
1747 // float handling accross browsers
1748 util.float = require(4);
1750 // requires modules optionally and hides the call from bundlers
1751 util.inquire = require(5);
1753 // converts to / from utf8 encoded strings
1754 util.utf8 = require(7);
1756 // provides a node-like buffer pool in the browser
1757 util.pool = require(6);
1759 // utility to work with the low and high bits of a 64 bit value
1760 util.LongBits = require(14);
1763 * Whether running within node or not.
1767 util.isNode = Boolean(typeof global !== "undefined"
1770 && global.process.versions
1771 && global.process.versions.node);
1774 * Global object reference.
1778 util.global = util.isNode && global
1779 || typeof window !== "undefined" && window
1780 || typeof self !== "undefined" && self
1781 || this; // eslint-disable-line no-invalid-this
1784 * An immuable empty array.
1789 util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes
1792 * An immutable empty object.
1796 util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes
1799 * Tests if the specified value is an integer.
1801 * @param {*} value Value to test
1802 * @returns {boolean} `true` if the value is an integer
1804 util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {
1805 return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
1809 * Tests if the specified value is a string.
1810 * @param {*} value Value to test
1811 * @returns {boolean} `true` if the value is a string
1813 util.isString = function isString(value) {
1814 return typeof value === "string" || value instanceof String;
1818 * Tests if the specified value is a non-null object.
1819 * @param {*} value Value to test
1820 * @returns {boolean} `true` if the value is a non-null object
1822 util.isObject = function isObject(value) {
1823 return value && typeof value === "object";
1827 * Checks if a property on a message is considered to be present.
1828 * This is an alias of {@link util.isSet}.
1830 * @param {Object} obj Plain object or message instance
1831 * @param {string} prop Property name
1832 * @returns {boolean} `true` if considered to be present, otherwise `false`
1837 * Checks if a property on a message is considered to be present.
1838 * @param {Object} obj Plain object or message instance
1839 * @param {string} prop Property name
1840 * @returns {boolean} `true` if considered to be present, otherwise `false`
1842 util.isSet = function isSet(obj, prop) {
1843 var value = obj[prop];
1844 if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins
1845 return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
1850 * Any compatible Buffer instance.
1851 * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.
1853 * @extends Uint8Array
1857 * Node's Buffer class if available.
1858 * @type {Constructor<Buffer>}
1860 util.Buffer = (function() {
1862 var Buffer = util.inquire("buffer").Buffer;
1863 // refuse to use non-node buffers if not explicitly assigned (perf reasons):
1864 return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;
1866 /* istanbul ignore next */
1871 // Internal alias of or polyfull for Buffer.from.
1872 util._Buffer_from = null;
1874 // Internal alias of or polyfill for Buffer.allocUnsafe.
1875 util._Buffer_allocUnsafe = null;
1878 * Creates a new buffer of whatever type supported by the environment.
1879 * @param {number|number[]} [sizeOrArray=0] Buffer size or number array
1880 * @returns {Uint8Array|Buffer} Buffer
1882 util.newBuffer = function newBuffer(sizeOrArray) {
1883 /* istanbul ignore next */
1884 return typeof sizeOrArray === "number"
1886 ? util._Buffer_allocUnsafe(sizeOrArray)
1887 : new util.Array(sizeOrArray)
1889 ? util._Buffer_from(sizeOrArray)
1890 : typeof Uint8Array === "undefined"
1892 : new Uint8Array(sizeOrArray);
1896 * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.
1897 * @type {Constructor<Uint8Array>}
1899 util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array;
1902 * Any compatible Long instance.
1903 * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.
1905 * @property {number} low Low bits
1906 * @property {number} high High bits
1907 * @property {boolean} unsigned Whether unsigned or not
1911 * Long.js's Long class if available.
1912 * @type {Constructor<Long>}
1914 util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long
1915 || /* istanbul ignore next */ util.global.Long
1916 || util.inquire("long");
1919 * Regular expression used to verify 2 bit (`bool`) map keys.
1923 util.key2Re = /^true|false|0|1$/;
1926 * Regular expression used to verify 32 bit (`int32` etc.) map keys.
1930 util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
1933 * Regular expression used to verify 64 bit (`int64` etc.) map keys.
1937 util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
1940 * Converts a number or long to an 8 characters long hash string.
1941 * @param {Long|number} value Value to convert
1942 * @returns {string} Hash
1944 util.longToHash = function longToHash(value) {
1946 ? util.LongBits.from(value).toHash()
1947 : util.LongBits.zeroHash;
1951 * Converts an 8 characters long hash string to a long or number.
1952 * @param {string} hash Hash
1953 * @param {boolean} [unsigned=false] Whether unsigned or not
1954 * @returns {Long|number} Original value
1956 util.longFromHash = function longFromHash(hash, unsigned) {
1957 var bits = util.LongBits.fromHash(hash);
1959 return util.Long.fromBits(bits.lo, bits.hi, unsigned);
1960 return bits.toNumber(Boolean(unsigned));
1964 * Merges the properties of the source object into the destination object.
1966 * @param {Object.<string,*>} dst Destination object
1967 * @param {Object.<string,*>} src Source object
1968 * @param {boolean} [ifNotSet=false] Merges only if the key is not already set
1969 * @returns {Object.<string,*>} Destination object
1971 function merge(dst, src, ifNotSet) { // used by converters
1972 for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
1973 if (dst[keys[i]] === undefined || !ifNotSet)
1974 dst[keys[i]] = src[keys[i]];
1981 * Converts the first character of a string to lower case.
1982 * @param {string} str String to convert
1983 * @returns {string} Converted string
1985 util.lcFirst = function lcFirst(str) {
1986 return str.charAt(0).toLowerCase() + str.substring(1);
1990 * Creates a custom error constructor.
1992 * @param {string} name Error name
1993 * @returns {Constructor<Error>} Custom error constructor
1995 function newError(name) {
1997 function CustomError(message, properties) {
1999 if (!(this instanceof CustomError))
2000 return new CustomError(message, properties);
2002 // Error.call(this, message);
2003 // ^ just returns a new error instance because the ctor can be called as a function
2005 Object.defineProperty(this, "message", { get: function() { return message; } });
2007 /* istanbul ignore next */
2008 if (Error.captureStackTrace) // node
2009 Error.captureStackTrace(this, CustomError);
2011 Object.defineProperty(this, "stack", { value: new Error().stack || "" });
2014 merge(this, properties);
2017 (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
2019 Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
2021 CustomError.prototype.toString = function toString() {
2022 return this.name + ": " + this.message;
2028 util.newError = newError;
2031 * Constructs a new protocol error.
2032 * @classdesc Error subclass indicating a protocol specifc error.
2035 * @template T extends Message<T>
2037 * @param {string} message Error message
2038 * @param {Object.<string,*>} [properties] Additional properties
2041 * MyMessage.decode(someBuffer); // throws if required fields are missing
2043 * if (e instanceof ProtocolError && e.instance)
2044 * console.log("decoded so far: " + JSON.stringify(e.instance));
2047 util.ProtocolError = newError("ProtocolError");
2050 * So far decoded message instance.
2051 * @name util.ProtocolError#instance
2052 * @type {Message<T>}
2056 * A OneOf getter as returned by {@link util.oneOfGetter}.
2057 * @typedef OneOfGetter
2059 * @returns {string|undefined} Set field name, if any
2063 * Builds a getter for a oneof's present field name.
2064 * @param {string[]} fieldNames Field names
2065 * @returns {OneOfGetter} Unbound getter
2067 util.oneOfGetter = function getOneOf(fieldNames) {
2069 for (var i = 0; i < fieldNames.length; ++i)
2070 fieldMap[fieldNames[i]] = 1;
2073 * @returns {string|undefined} Set field name, if any
2077 return function() { // eslint-disable-line consistent-return
2078 for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)
2079 if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)
2085 * A OneOf setter as returned by {@link util.oneOfSetter}.
2086 * @typedef OneOfSetter
2088 * @param {string|undefined} value Field name
2089 * @returns {undefined}
2093 * Builds a setter for a oneof's present field name.
2094 * @param {string[]} fieldNames Field names
2095 * @returns {OneOfSetter} Unbound setter
2097 util.oneOfSetter = function setOneOf(fieldNames) {
2100 * @param {string} name Field name
2101 * @returns {undefined}
2105 return function(name) {
2106 for (var i = 0; i < fieldNames.length; ++i)
2107 if (fieldNames[i] !== name)
2108 delete this[fieldNames[i]];
2113 * Default conversion options used for {@link Message#toJSON} implementations.
2115 * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:
2117 * - Longs become strings
2118 * - Enums become string keys
2119 * - Bytes become base64 encoded strings
2120 * - (Sub-)Messages become plain objects
2121 * - Maps become plain objects with all string keys
2122 * - Repeated fields become arrays
2123 * - NaN and Infinity for float and double fields become strings
2125 * @type {IConversionOptions}
2126 * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json
2128 util.toJSONOptions = {
2135 // Sets up buffer utility according to the environment (called in index-minimal)
2136 util._configure = function() {
2137 var Buffer = util.Buffer;
2138 /* istanbul ignore if */
2140 util._Buffer_from = util._Buffer_allocUnsafe = null;
2143 // because node 4.x buffers are incompatible & immutable
2144 // see: https://github.com/dcodeIO/protobuf.js/pull/665
2145 util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||
2146 /* istanbul ignore next */
2147 function Buffer_from(value, encoding) {
2148 return new Buffer(value, encoding);
2150 util._Buffer_allocUnsafe = Buffer.allocUnsafe ||
2151 /* istanbul ignore next */
2152 function Buffer_allocUnsafe(size) {
2153 return new Buffer(size);
2157 },{"1":1,"14":14,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7}],16:[function(require,module,exports){
2159 module.exports = Writer;
2161 var util = require(15);
2163 var BufferWriter; // cyclic
2165 var LongBits = util.LongBits,
2166 base64 = util.base64,
2170 * Constructs a new writer operation instance.
2171 * @classdesc Scheduled writer operation.
2173 * @param {function(*, Uint8Array, number)} fn Function to call
2174 * @param {number} len Value byte length
2175 * @param {*} val Value to write
2178 function Op(fn, len, val) {
2182 * @type {function(Uint8Array, number, *)}
2187 * Value byte length.
2194 * @type {Writer.Op|undefined}
2196 this.next = undefined;
2202 this.val = val; // type varies
2205 /* istanbul ignore next */
2206 function noop() {} // eslint-disable-line no-empty-function
2209 * Constructs a new writer state instance.
2210 * @classdesc Copied writer state.
2213 * @param {Writer} writer Writer to copy state from
2216 function State(writer) {
2222 this.head = writer.head;
2228 this.tail = writer.tail;
2231 * Current buffer length.
2234 this.len = writer.len;
2238 * @type {State|null}
2240 this.next = writer.states;
2244 * Constructs a new writer instance.
2245 * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.
2260 this.head = new Op(noop, 0, 0);
2266 this.tail = this.head;
2269 * Linked forked states.
2270 * @type {Object|null}
2274 // When a value is written, the writer calculates its byte length and puts it into a linked
2275 // list of operations to perform when finish() is called. This both allows us to allocate
2276 // buffers of the exact required size and reduces the amount of work we have to do compared
2277 // to first calculating over objects and then encoding over objects. In our case, the encoding
2278 // part is just a linked list walk calling operations with already prepared values.
2281 var create = function create() {
2283 ? function create_buffer_setup() {
2284 return (Writer.create = function create_buffer() {
2285 return new BufferWriter();
2288 /* istanbul ignore next */
2289 : function create_array() {
2290 return new Writer();
2295 * Creates a new writer.
2297 * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}
2299 Writer.create = create();
2302 * Allocates a buffer of the specified size.
2303 * @param {number} size Buffer size
2304 * @returns {Uint8Array} Buffer
2306 Writer.alloc = function alloc(size) {
2307 return new util.Array(size);
2310 // Use Uint8Array buffer pool in the browser, just like node does with buffers
2311 /* istanbul ignore else */
2312 if (util.Array !== Array)
2313 Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
2316 * Pushes a new operation to the queue.
2317 * @param {function(Uint8Array, number, *)} fn Function to call
2318 * @param {number} len Value byte length
2319 * @param {number} val Value to write
2320 * @returns {Writer} `this`
2323 Writer.prototype._push = function push(fn, len, val) {
2324 this.tail = this.tail.next = new Op(fn, len, val);
2329 function writeByte(val, buf, pos) {
2330 buf[pos] = val & 255;
2333 function writeVarint32(val, buf, pos) {
2335 buf[pos++] = val & 127 | 128;
2342 * Constructs a new varint writer operation instance.
2343 * @classdesc Scheduled varint writer operation.
2346 * @param {number} len Value byte length
2347 * @param {number} val Value to write
2350 function VarintOp(len, val) {
2352 this.next = undefined;
2356 VarintOp.prototype = Object.create(Op.prototype);
2357 VarintOp.prototype.fn = writeVarint32;
2360 * Writes an unsigned 32 bit value as a varint.
2361 * @param {number} value Value to write
2362 * @returns {Writer} `this`
2364 Writer.prototype.uint32 = function write_uint32(value) {
2365 // here, the call to this.push has been inlined and a varint specific Op subclass is used.
2366 // uint32 is by far the most frequently used operation and benefits significantly from this.
2367 this.len += (this.tail = this.tail.next = new VarintOp(
2368 (value = value >>> 0)
2371 : value < 2097152 ? 3
2372 : value < 268435456 ? 4
2379 * Writes a signed 32 bit value as a varint.
2381 * @param {number} value Value to write
2382 * @returns {Writer} `this`
2384 Writer.prototype.int32 = function write_int32(value) {
2386 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec
2387 : this.uint32(value);
2391 * Writes a 32 bit value as a varint, zig-zag encoded.
2392 * @param {number} value Value to write
2393 * @returns {Writer} `this`
2395 Writer.prototype.sint32 = function write_sint32(value) {
2396 return this.uint32((value << 1 ^ value >> 31) >>> 0);
2399 function writeVarint64(val, buf, pos) {
2401 buf[pos++] = val.lo & 127 | 128;
2402 val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
2405 while (val.lo > 127) {
2406 buf[pos++] = val.lo & 127 | 128;
2407 val.lo = val.lo >>> 7;
2409 buf[pos++] = val.lo;
2413 * Writes an unsigned 64 bit value as a varint.
2414 * @param {Long|number|string} value Value to write
2415 * @returns {Writer} `this`
2416 * @throws {TypeError} If `value` is a string and no long library is present.
2418 Writer.prototype.uint64 = function write_uint64(value) {
2419 var bits = LongBits.from(value);
2420 return this._push(writeVarint64, bits.length(), bits);
2424 * Writes a signed 64 bit value as a varint.
2426 * @param {Long|number|string} value Value to write
2427 * @returns {Writer} `this`
2428 * @throws {TypeError} If `value` is a string and no long library is present.
2430 Writer.prototype.int64 = Writer.prototype.uint64;
2433 * Writes a signed 64 bit value as a varint, zig-zag encoded.
2434 * @param {Long|number|string} value Value to write
2435 * @returns {Writer} `this`
2436 * @throws {TypeError} If `value` is a string and no long library is present.
2438 Writer.prototype.sint64 = function write_sint64(value) {
2439 var bits = LongBits.from(value).zzEncode();
2440 return this._push(writeVarint64, bits.length(), bits);
2444 * Writes a boolish value as a varint.
2445 * @param {boolean} value Value to write
2446 * @returns {Writer} `this`
2448 Writer.prototype.bool = function write_bool(value) {
2449 return this._push(writeByte, 1, value ? 1 : 0);
2452 function writeFixed32(val, buf, pos) {
2453 buf[pos ] = val & 255;
2454 buf[pos + 1] = val >>> 8 & 255;
2455 buf[pos + 2] = val >>> 16 & 255;
2456 buf[pos + 3] = val >>> 24;
2460 * Writes an unsigned 32 bit value as fixed 32 bits.
2461 * @param {number} value Value to write
2462 * @returns {Writer} `this`
2464 Writer.prototype.fixed32 = function write_fixed32(value) {
2465 return this._push(writeFixed32, 4, value >>> 0);
2469 * Writes a signed 32 bit value as fixed 32 bits.
2471 * @param {number} value Value to write
2472 * @returns {Writer} `this`
2474 Writer.prototype.sfixed32 = Writer.prototype.fixed32;
2477 * Writes an unsigned 64 bit value as fixed 64 bits.
2478 * @param {Long|number|string} value Value to write
2479 * @returns {Writer} `this`
2480 * @throws {TypeError} If `value` is a string and no long library is present.
2482 Writer.prototype.fixed64 = function write_fixed64(value) {
2483 var bits = LongBits.from(value);
2484 return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
2488 * Writes a signed 64 bit value as fixed 64 bits.
2490 * @param {Long|number|string} value Value to write
2491 * @returns {Writer} `this`
2492 * @throws {TypeError} If `value` is a string and no long library is present.
2494 Writer.prototype.sfixed64 = Writer.prototype.fixed64;
2497 * Writes a float (32 bit).
2499 * @param {number} value Value to write
2500 * @returns {Writer} `this`
2502 Writer.prototype.float = function write_float(value) {
2503 return this._push(util.float.writeFloatLE, 4, value);
2507 * Writes a double (64 bit float).
2509 * @param {number} value Value to write
2510 * @returns {Writer} `this`
2512 Writer.prototype.double = function write_double(value) {
2513 return this._push(util.float.writeDoubleLE, 8, value);
2516 var writeBytes = util.Array.prototype.set
2517 ? function writeBytes_set(val, buf, pos) {
2518 buf.set(val, pos); // also works for plain array values
2520 /* istanbul ignore next */
2521 : function writeBytes_for(val, buf, pos) {
2522 for (var i = 0; i < val.length; ++i)
2523 buf[pos + i] = val[i];
2527 * Writes a sequence of bytes.
2528 * @param {Uint8Array|string} value Buffer or base64 encoded string to write
2529 * @returns {Writer} `this`
2531 Writer.prototype.bytes = function write_bytes(value) {
2532 var len = value.length >>> 0;
2534 return this._push(writeByte, 1, 0);
2535 if (util.isString(value)) {
2536 var buf = Writer.alloc(len = base64.length(value));
2537 base64.decode(value, buf, 0);
2540 return this.uint32(len)._push(writeBytes, len, value);
2545 * @param {string} value Value to write
2546 * @returns {Writer} `this`
2548 Writer.prototype.string = function write_string(value) {
2549 var len = utf8.length(value);
2551 ? this.uint32(len)._push(utf8.write, len, value)
2552 : this._push(writeByte, 1, 0);
2556 * Forks this writer's state by pushing it to a stack.
2557 * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
2558 * @returns {Writer} `this`
2560 Writer.prototype.fork = function fork() {
2561 this.states = new State(this);
2562 this.head = this.tail = new Op(noop, 0, 0);
2568 * Resets this instance to the last state.
2569 * @returns {Writer} `this`
2571 Writer.prototype.reset = function reset() {
2573 this.head = this.states.head;
2574 this.tail = this.states.tail;
2575 this.len = this.states.len;
2576 this.states = this.states.next;
2578 this.head = this.tail = new Op(noop, 0, 0);
2585 * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
2586 * @returns {Writer} `this`
2588 Writer.prototype.ldelim = function ldelim() {
2589 var head = this.head,
2592 this.reset().uint32(len);
2594 this.tail.next = head.next; // skip noop
2602 * Finishes the write operation.
2603 * @returns {Uint8Array} Finished buffer
2605 Writer.prototype.finish = function finish() {
2606 var head = this.head.next, // skip noop
2607 buf = this.constructor.alloc(this.len),
2610 head.fn(head.val, buf, pos);
2614 // this.head = this.tail = null;
2618 Writer._configure = function(BufferWriter_) {
2619 BufferWriter = BufferWriter_;
2620 Writer.create = create();
2621 BufferWriter._configure();
2624 },{"15":15}],17:[function(require,module,exports){
2626 module.exports = BufferWriter;
2629 var Writer = require(16);
2630 (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
2632 var util = require(15);
2635 * Constructs a new buffer writer instance.
2636 * @classdesc Wire format writer using node buffers.
2640 function BufferWriter() {
2644 BufferWriter._configure = function () {
2646 * Allocates a buffer of the specified size.
2648 * @param {number} size Buffer size
2649 * @returns {Buffer} Buffer
2651 BufferWriter.alloc = util._Buffer_allocUnsafe;
2653 BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set"
2654 ? function writeBytesBuffer_set(val, buf, pos) {
2655 buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
2656 // also works for plain array values
2658 /* istanbul ignore next */
2659 : function writeBytesBuffer_copy(val, buf, pos) {
2660 if (val.copy) // Buffer values
2661 val.copy(buf, pos, 0, val.length);
2662 else for (var i = 0; i < val.length;) // plain array values
2663 buf[pos++] = val[i++];
2671 BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
2672 if (util.isString(value))
2673 value = util._Buffer_from(value, "base64");
2674 var len = value.length >>> 0;
2677 this._push(BufferWriter.writeBytesBuffer, len, value);
2681 function writeStringBuffer(val, buf, pos) {
2682 if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
2683 util.utf8.write(val, buf, pos);
2684 else if (buf.utf8Write)
2685 buf.utf8Write(val, pos);
2687 buf.write(val, pos);
2693 BufferWriter.prototype.string = function write_string_buffer(value) {
2694 var len = util.Buffer.byteLength(value);
2697 this._push(writeStringBuffer, len, value);
2703 * Finishes the write operation.
2704 * @name BufferWriter#finish
2706 * @returns {Buffer} Finished buffer
2709 BufferWriter._configure();
2711 },{"15":15,"16":16}]},{},[8])
2714 //# sourceMappingURL=protobuf.js.map