diff --git a/.eslintignore b/.eslintignore index 3ccbd7a5..1b9afeb3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,4 +3,4 @@ src/imp/platform/browser/thrift_api/crouton_types.js src/imp/platform/node/generated/crouton_types.js src/imp/platform/node/thrift_api/crouton_types.js src/imp/platform/node/crouton_thrift.js -src/imp/generated_proto +src/imp/generated_proto.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 42cb8b1d..20496b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ *Log of significant changes, especially those affecting the supported API.* +## Unreleased + +* Switch protobuf compilers to [protobuf.js](https://github.com/dcodeIO/ProtoBuf.js/). + ## 0.21.0 * Update `thrift` to `0.11.0`. This breaks support for node.js versions <= 5.8. diff --git a/Makefile b/Makefile index 6c179c66..64f9c7c9 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ recursive_wildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call recursi # build # CMD_BABEL=node node_modules/.bin/babel +CMD_PROTO=node node_modules/.bin/pbjs CMD_WEBPACK=node node_modules/.bin/webpack SOURCES_JS=$(call recursive_wildcard,src/,*.js) COMPILED_JS=$(SOURCES_JS:src/%.js=lib/%.js) @@ -142,6 +143,9 @@ thrift-postprocess: # LightStep internal target .PHONY: proto proto: - protoc -I"$(PWD)/../googleapis/:$(PWD)/../lightstep-tracer-common/" \ - --js_out=import_style=commonjs,binary:src/imp/generated_proto \ - collector.proto google/api/annotations.proto google/api/http.proto + $(CMD_PROTO) \ + -p ../googleapis \ + -p ../lightstep-tracer-common \ + -t static-module \ + --es6 \ + ../lightstep-tracer-common/collector.proto > src/imp/generated_proto.js diff --git a/dist/lightstep-tracer.js b/dist/lightstep-tracer.js index 988f54ee..e1249184 100644 --- a/dist/lightstep-tracer.js +++ b/dist/lightstep-tracer.js @@ -96,17166 +96,9098 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ -/***/ "./node_modules/base64-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/base64-js/index.js ***! - \*****************************************/ +/***/ "./node_modules/@protobufjs/aspromise/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/@protobufjs/aspromise/index.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; + +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array +/***/ }), -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} +/***/ "./node_modules/@protobufjs/base64/index.js": +/*!**************************************************!*\ + !*** ./node_modules/@protobufjs/base64/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 +"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 parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +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); +}; -function getLens (b64) { - var len = b64.length - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } +/***/ }), - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len +/***/ "./node_modules/@protobufjs/eventemitter/index.js": +/*!********************************************************!*\ + !*** ./node_modules/@protobufjs/eventemitter/index.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) +"use strict"; + +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; - return [validLen, placeHoldersLen] -} -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} +/***/ }), -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} +/***/ "./node_modules/@protobufjs/float/index.js": +/*!*************************************************!*\ + !*** ./node_modules/@protobufjs/float/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - for (var i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } +"use strict"; + + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } +/***/ }), - return arr -} +/***/ "./node_modules/@protobufjs/inquire/index.js": +/*!***************************************************!*\ + !*** ./node_modules/@protobufjs/inquire/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} +"use strict"; + +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk( - uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) - )) - } +/***/ }), - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } +/***/ "./node_modules/@protobufjs/pool/index.js": +/*!************************************************!*\ + !*** ./node_modules/@protobufjs/pool/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return parts.join('') -} +"use strict"; + +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} /***/ }), -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ +/***/ "./node_modules/@protobufjs/utf8/index.js": +/*!************************************************!*\ + !*** ./node_modules/@protobufjs/utf8/index.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ + + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; +/***/ }), -var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js") -var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js") -var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js") +/***/ "./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 +"use strict"; -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() +// +// We store our EE objects in a plain object whose properties are event names. +// If `Object.create(null)` is not supported we prefix the event names with a +// `~` to make sure that the built-in object properties are not overridden or +// used as an attack vector. +// We also assume that `Object.create(null)` is available when the event name +// is an ES6 Symbol. +// +var prefix = typeof Object.create !== 'function' ? '~' : false; -/* - * Export kMaxLength after typed array support is determined. +/** + * Representation of a single EventEmitter function. + * + * @param {Function} fn Event handler to be called. + * @param {Mixed} context Context for function execution. + * @param {Boolean} once Only emit once + * @api private */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; } -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } +/** + * Minimal EventEmitter interface that is molded against the Node.js + * EventEmitter interface. + * + * @constructor + * @api public + */ +function EventEmitter() { /* Nothing to set */ } - return that -} +/** + * Holds the assigned EventEmitters by name. + * + * @type {Object} + * @private + */ +EventEmitter.prototype._events = undefined; /** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. + * Return a list of assigned event listeners. * - * The `Uint8Array` prototype remains unmodified. + * @param {String} event The events that should be listed. + * @param {Boolean} exists We only need to know if there are listeners. + * @returns {Array|Boolean} + * @api public */ +EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events && this._events[evt]; -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} + return ee; +}; -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } +/** + * Emit an event to all registered event listeners. + * + * @param {String} event The name of the event. + * @returns {Boolean} Indication if we've emitted an event. + * @api public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } + if (!this._events || !this._events[evt]) return false; - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } + var listeners = this._events[evt] + , len = arguments.length + , args + , i; - return fromObject(that, value) -} + if ('function' === typeof listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 + listeners[i].fn.apply(listeners[i].context, args); + } } } - return that -} + + return true; +}; /** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + * Register a new EventListener for the given event. + * + * @param {String} event Name of the event. + * @param {Functon} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } +EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; } - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) + return this; +}; - var actual = that.write(string, encoding) +/** + * Add an EventListener that's only called once. + * + * @param {String} event Name of the event. + * @param {Function} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; } - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} + return this; +}; -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer +/** + * Remove event listeners. + * + * @param {String} event The event we want to remove. + * @param {Function} fn The listener that we need to find. + * @param {Mixed} context Only remove listeners matching this context. + * @param {Boolean} once Only remove once listeners. + * @api public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } + if (!this._events || !this._events[evt]) return this; - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } + var listeners = this._events[evt] + , events = []; - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) + if (fn) { + if (listeners.fn) { + if ( + listeners.fn !== fn + || (once && !listeners.once) + || (context && listeners.context !== context) + ) { + events.push(listeners); + } + } else { + for (var i = 0, length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) } } - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) { + this._events[evt] = events.length === 1 ? events[0] : events; + } else { + delete this._events[evt]; } - return length | 0 -} -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} + return this; +}; -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} +/** + * Remove all listeners or only the listeners for the specified event. + * + * @param {String} event The event want to remove all listeners for. + * @api public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + if (!this._events) return this; -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } + if (event) delete this._events[prefix ? prefix + event : event]; + else this._events = prefix ? {} : Object.create(null); - if (a === b) return 0 + return this; +}; - var x = a.length - var y = b.length +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } +// +// This function doesn't apply anymore. +// +EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; +}; - if (x < y) return -1 - if (y < x) return 1 - return 0 -} +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } +// +// Expose the module. +// +if (true) { + module.exports = EventEmitter; } -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } +/***/ }), - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} +/***/ "./node_modules/hex2dec/index.js": +/*!***************************************!*\ + !*** ./node_modules/hex2dec/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } +/** + * A function for converting hex <-> dec w/o loss of precision. + * + * The problem is that parseInt("0x12345...") isn't precise enough to convert + * 64-bit integers correctly. + * + * Internally, this uses arrays to encode decimal digits starting with the least + * significant: + * 8 = [8] + * 16 = [6, 1] + * 1024 = [4, 2, 0, 1] + * + * Source: http://www.danvk.org/hex2dec.html + */ - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } +// Adds two arrays for the given base (10 or 16), returning the result. +// This turns out to be the only "primitive" operation we need. +function add(x, y, base) { + var z = []; + var n = Math.max(x.length, y.length); + var carry = 0; + var i = 0; + while (i < n || carry) { + var xi = i < x.length ? x[i] : 0; + var yi = i < y.length ? y[i] : 0; + var zi = carry + xi + yi; + z.push(zi % base); + carry = Math.floor(zi / base); + i++; } + return z; } -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' +// Returns a*x, where x is an array of decimal digits and a is an ordinary +// JavaScript number. base is the number base of the array x. +function multiplyByNumber(num, x, base) { + if (num < 0) return null; + if (num == 0) return []; + var result = []; + var power = x; while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true + if (num & 1) { + result = add(result, power, base); } + num = num >> 1; + if (num === 0) break; + power = add(power, power, base); } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i + return result; } -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) +function parseToDigitsArray(str, base) { + var digits = str.split(''); + var ary = []; + for (var i = digits.length - 1; i >= 0; i--) { + var n = parseInt(digits[i], base); + if (isNaN(n)) return null; + ary.push(n); } - return this + return ary; } -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} +function convertBase(str, fromBase, toBase) { + var digits = parseToDigitsArray(str, fromBase); + if (digits === null) return null; -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) + var outArray = []; + var power = [1]; + for (var i = 0; i < digits.length; i++) { + // invariant: at this point, fromBase^i = power + if (digits[i]) { + outArray = add(outArray, multiplyByNumber(digits[i], power, toBase), toBase); + } + power = multiplyByNumber(fromBase, power, toBase); } - return this -} -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) + var out = ''; + for (var i = outArray.length - 1; i >= 0; i--) { + out += outArray[i].toString(toBase); + } + return out; } -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 +function decToHex(decStr) { + var hex = convertBase(decStr, 10, 16); + return hex ? '0x' + hex : null; } -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' +function hexToDec(hexStr) { + if (hexStr.substring(0, 2) === '0x') hexStr = hexStr.substring(2); + hexStr = hexStr.toLowerCase(); + return convertBase(hexStr, 16, 10); } -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } +module.exports = { + hexToDec: hexToDec, + decToHex: decToHex +}; - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - if (this === target) return 0 +/***/ }), - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) +/***/ "./node_modules/opentracing/lib/binary_carrier.js": +/*!********************************************************!*\ + !*** ./node_modules/opentracing/lib/binary_carrier.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) +"use strict"; - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Convenience class to use as a binary carrier. + * + * Any valid Object with a field named `buffer` may be used as a binary carrier; + * this class is only one such type of object that can be used. + */ +var BinaryCarrier = /** @class */ (function () { + function BinaryCarrier(buffer) { + this.buffer = buffer; } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } + return BinaryCarrier; +}()); +exports.default = BinaryCarrier; +//# sourceMappingURL=binary_carrier.js.map - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } +/***/ }), - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } +/***/ "./node_modules/opentracing/lib/constants.js": +/*!***************************************************!*\ + !*** ./node_modules/opentracing/lib/constants.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } +"use strict"; - throw new TypeError('val must be string, number or Buffer') -} +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * The FORMAT_BINARY format represents SpanContexts in an opaque binary + * carrier. + * + * Tracer.inject() will set the buffer field to an Array-like (Array, + * ArrayBuffer, or TypedBuffer) object containing the injected binary data. + * Any valid Object can be used as long as the buffer field of the object + * can be set. + * + * Tracer.extract() will look for `carrier.buffer`, and that field is + * expected to be an Array-like object (Array, ArrayBuffer, or + * TypedBuffer). + */ +exports.FORMAT_BINARY = 'binary'; +/** + * The FORMAT_TEXT_MAP format represents SpanContexts using a + * string->string map (backed by a Javascript Object) as a carrier. + * + * NOTE: Unlike FORMAT_HTTP_HEADERS, FORMAT_TEXT_MAP places no restrictions + * on the characters used in either the keys or the values of the map + * entries. + * + * The FORMAT_TEXT_MAP carrier map may contain unrelated data (e.g., + * arbitrary gRPC metadata); as such, the Tracer implementation should use + * a prefix or other convention to distinguish Tracer-specific key:value + * pairs. + */ +exports.FORMAT_TEXT_MAP = 'text_map'; +/** + * The FORMAT_HTTP_HEADERS format represents SpanContexts using a + * character-restricted string->string map (backed by a Javascript Object) + * as a carrier. + * + * Keys and values in the FORMAT_HTTP_HEADERS carrier must be suitable for + * use as HTTP headers (without modification or further escaping). That is, + * the keys have a greatly restricted character set, casing for the keys + * may not be preserved by various intermediaries, and the values should be + * URL-escaped. + * + * The FORMAT_HTTP_HEADERS carrier map may contain unrelated data (e.g., + * arbitrary HTTP headers); as such, the Tracer implementation should use a + * prefix or other convention to distinguish Tracer-specific key:value + * pairs. + */ +exports.FORMAT_HTTP_HEADERS = 'http_headers'; +/** + * A Span may be the "child of" a parent Span. In a “child of” reference, + * the parent Span depends on the child Span in some capacity. + * + * See more about reference types at https://github.com/opentracing/specification + */ +exports.REFERENCE_CHILD_OF = 'child_of'; +/** + * Some parent Spans do not depend in any way on the result of their child + * Spans. In these cases, we say merely that the child Span “follows from” + * the parent Span in a causal sense. + * + * See more about reference types at https://github.com/opentracing/specification + */ +exports.REFERENCE_FOLLOWS_FROM = 'follows_from'; +//# sourceMappingURL=constants.js.map -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } +/***/ }), - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } +/***/ "./node_modules/opentracing/lib/ext/tags.js": +/*!**************************************************!*\ + !*** ./node_modules/opentracing/lib/ext/tags.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } +"use strict"; - return -1 -} +Object.defineProperty(exports, "__esModule", { value: true }); +/** SPAN_KIND hints at relationship between spans, e.g. client/server */ +exports.SPAN_KIND = 'span.kind'; +/** Marks a span representing the client-side of an RPC or other remote call */ +exports.SPAN_KIND_RPC_CLIENT = 'client'; +/** Marks a span representing the server-side of an RPC or other remote call */ +exports.SPAN_KIND_RPC_SERVER = 'server'; +/** Marks a span representing the producing-side within a messaging system or other remote call */ +exports.SPAN_KIND_MESSAGING_PRODUCER = 'producer'; +/** Marks a span representing the consuming-side within a messaging system or other remote call */ +exports.SPAN_KIND_MESSAGING_CONSUMER = 'consumer'; +/** + * ERROR (boolean) true if and only if the application considers the operation + * represented by the Span to have failed + */ +exports.ERROR = 'error'; +/** + * COMPONENT (string) ia s low-cardinality identifier of the module, library, + * or package that is generating a span. + */ +exports.COMPONENT = 'component'; +/** + * SAMPLING_PRIORITY (number) determines the priority of sampling this Span. + * If greater than 0, a hint to the Tracer to do its best to capture the trace. + * If 0, a hint to the trace to not-capture the trace. If absent, the Tracer + * should use its default sampling mechanism. + */ +exports.SAMPLING_PRIORITY = 'sampling.priority'; +// --------------------------------------------------------------------------- +// PEER_* tags can be emitted by either client-side of server-side to describe +// the other side/service in a peer-to-peer communications, like an RPC call. +// --------------------------------------------------------------------------- +/** + * PEER_SERVICE (string) Remote service name (for some unspecified + * definition of "service"). E.g., "elasticsearch", "a_custom_microservice", "memcache" + */ +exports.PEER_SERVICE = 'peer.service'; +/** PEER_HOSTNAME (string) Remote hostname. E.g., "opentracing.io", "internal.dns.name" */ +exports.PEER_HOSTNAME = 'peer.hostname'; +/** + * PEER_ADDRESS (string) Remote "address", suitable for use in a + * networking client library. This may be a "ip:port", a bare + * "hostname", a FQDN, or even a JDBC substring like "mysql://prod-db:3306" + */ +exports.PEER_ADDRESS = 'peer.address'; +/** + * PEER_HOST_IPV4 (number) Remote IPv4 address as a .-separated tuple. + * E.g., "127.0.0.1" + */ +exports.PEER_HOST_IPV4 = 'peer.ipv4'; +// PEER_HOST_IPV6 (string) Remote IPv6 address as a string of +// colon-separated 4-char hex tuples. E.g., "2001:0db8:85a3:0000:0000:8a2e:0370:7334" +exports.PEER_HOST_IPV6 = 'peer.ipv6'; +// PEER_PORT (number) Remote port. E.g., 80 +exports.PEER_PORT = 'peer.port'; +// --------------------------------------------------------------------------- +// HTTP tags +// --------------------------------------------------------------------------- +/** + * HTTP_URL (string) URL of the request being handled in this segment of the + * trace, in standard URI format. E.g., "https://domain.net/path/to?resource=here" + */ +exports.HTTP_URL = 'http.url'; +/** + * HTTP_METHOD (string) HTTP method of the request for the associated Span. E.g., + * "GET", "POST" + */ +exports.HTTP_METHOD = 'http.method'; +/** + * HTTP_STATUS_CODE (number) HTTP response status code for the associated Span. + * E.g., 200, 503, 404 + */ +exports.HTTP_STATUS_CODE = 'http.status_code'; +// ------------------------------------------------------------------------- +// Messaging tags +// ------------------------------------------------------------------------- +/** + * MESSAGE_BUS_DESTINATION (string) An address at which messages can be exchanged. + * E.g. A Kafka record has an associated "topic name" that can be extracted + * by the instrumented producer or consumer and stored using this tag. + */ +exports.MESSAGE_BUS_DESTINATION = 'message_bus.destination'; +// -------------------------------------------------------------------------- +// Database tags +// -------------------------------------------------------------------------- +/** + * DB_INSTANCE (string) Database instance name. E.g., In java, if the + * jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is "customers". + */ +exports.DB_INSTANCE = 'db.instance'; +/** + * DB_STATEMENT (string) A database statement for the given database type. + * E.g., for db.type="SQL", "SELECT * FROM wuser_table"; + * for db.type="redis", "SET mykey 'WuValue'". + */ +exports.DB_STATEMENT = 'db.statement'; +/** + * DB_TYPE (string) Database type. For any SQL database, "sql". For others, + * the lower-case database category, e.g. "cassandra", "hbase", or "redis". + */ +exports.DB_TYPE = 'db.type'; +/** + * DB_USER (string) Username for accessing database. E.g., "readonly_user" + * or "reporting_user" + */ +exports.DB_USER = 'db.user'; +//# sourceMappingURL=tags.js.map -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} +/***/ }), -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} +/***/ "./node_modules/opentracing/lib/functions.js": +/*!***************************************************!*\ + !*** ./node_modules/opentracing/lib/functions.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} +"use strict"; -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining +Object.defineProperty(exports, "__esModule", { value: true }); +var Constants = __webpack_require__(/*! ./constants */ "./node_modules/opentracing/lib/constants.js"); +var reference_1 = __webpack_require__(/*! ./reference */ "./node_modules/opentracing/lib/reference.js"); +var span_1 = __webpack_require__(/*! ./span */ "./node_modules/opentracing/lib/span.js"); +/** + * Return a new REFERENCE_CHILD_OF reference. + * + * @param {SpanContext} spanContext - the parent SpanContext instance to + * reference. + * @return a REFERENCE_CHILD_OF reference pointing to `spanContext` + */ +function childOf(spanContext) { + // Allow the user to pass a Span instead of a SpanContext + if (spanContext instanceof span_1.default) { + spanContext = spanContext.context(); } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) + return new reference_1.default(Constants.REFERENCE_CHILD_OF, spanContext); } - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) +exports.childOf = childOf; +/** + * Return a new REFERENCE_FOLLOWS_FROM reference. + * + * @param {SpanContext} spanContext - the parent SpanContext instance to + * reference. + * @return a REFERENCE_FOLLOWS_FROM reference pointing to `spanContext` + */ +function followsFrom(spanContext) { + // Allow the user to pass a Span instead of a SpanContext + if (spanContext instanceof span_1.default) { + spanContext = spanContext.context(); + } + return new reference_1.default(Constants.REFERENCE_FOLLOWS_FROM, spanContext); } +exports.followsFrom = followsFrom; +//# sourceMappingURL=functions.js.map -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} +/***/ }), -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} +/***/ "./node_modules/opentracing/lib/global_tracer.js": +/*!*******************************************************!*\ + !*** ./node_modules/opentracing/lib/global_tracer.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} +"use strict"; -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var tracer_1 = __webpack_require__(/*! ./tracer */ "./node_modules/opentracing/lib/tracer.js"); +var noopTracer = new tracer_1.default(); +var _globalTracer = null; +// Allows direct importing/requiring of the global tracer: +// +// let globalTracer = require('opentracing/global'); +// OR +// import globalTracer from 'opentracing/global'; +// +// Acts a bridge to the global tracer that can be safely called before the +// global tracer is initialized. The purpose of the delegation is to avoid the +// sometimes nearly intractible initialization order problems that can arise in +// applications with a complex set of dependencies, while also avoiding the +// case where +var GlobalTracerDelegate = /** @class */ (function (_super) { + __extends(GlobalTracerDelegate, _super); + function GlobalTracerDelegate() { + return _super !== null && _super.apply(this, arguments) || this; } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } + GlobalTracerDelegate.prototype.startSpan = function () { + var tracer = _globalTracer || noopTracer; + return tracer.startSpan.apply(tracer, arguments); + }; + GlobalTracerDelegate.prototype.inject = function () { + var tracer = _globalTracer || noopTracer; + return tracer.inject.apply(tracer, arguments); + }; + GlobalTracerDelegate.prototype.extract = function () { + var tracer = _globalTracer || noopTracer; + return tracer.extract.apply(tracer, arguments); + }; + return GlobalTracerDelegate; +}(tracer_1.default)); +var globalTracerDelegate = new GlobalTracerDelegate(); +/** + * Set the global Tracer. + * + * The behavior is undefined if this function is called more than once. + * + * @param {Tracer} tracer - the Tracer implementation + */ +function initGlobalTracer(tracer) { + _globalTracer = tracer; } - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } +exports.initGlobalTracer = initGlobalTracer; +/** + * Returns the global tracer. + */ +function globalTracer() { + // Return the delegate. Since the global tracer is largely a convenience + // (the user can always create their own tracers), the delegate is used to + // give the added convenience of not needing to worry about initialization + // order. + return globalTracerDelegate; } +exports.globalTracer = globalTracer; +//# sourceMappingURL=global_tracer.js.map -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} +/***/ }), -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 +/***/ "./node_modules/opentracing/lib/index.js": +/*!***********************************************!*\ + !*** ./node_modules/opentracing/lib/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } +"use strict"; - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } +Object.defineProperty(exports, "__esModule", { value: true }); +var binary_carrier_1 = __webpack_require__(/*! ./binary_carrier */ "./node_modules/opentracing/lib/binary_carrier.js"); +exports.BinaryCarrier = binary_carrier_1.default; +var Tags = __webpack_require__(/*! ./ext/tags */ "./node_modules/opentracing/lib/ext/tags.js"); +exports.Tags = Tags; +var Noop = __webpack_require__(/*! ./noop */ "./node_modules/opentracing/lib/noop.js"); +var reference_1 = __webpack_require__(/*! ./reference */ "./node_modules/opentracing/lib/reference.js"); +exports.Reference = reference_1.default; +var span_1 = __webpack_require__(/*! ./span */ "./node_modules/opentracing/lib/span.js"); +exports.Span = span_1.default; +var span_context_1 = __webpack_require__(/*! ./span_context */ "./node_modules/opentracing/lib/span_context.js"); +exports.SpanContext = span_context_1.default; +var tracer_1 = __webpack_require__(/*! ./tracer */ "./node_modules/opentracing/lib/tracer.js"); +exports.Tracer = tracer_1.Tracer; +var mock_tracer_1 = __webpack_require__(/*! ./mock_tracer */ "./node_modules/opentracing/lib/mock_tracer/index.js"); +exports.MockTracer = mock_tracer_1.MockTracer; +__export(__webpack_require__(/*! ./global_tracer */ "./node_modules/opentracing/lib/global_tracer.js")); +__export(__webpack_require__(/*! ./constants */ "./node_modules/opentracing/lib/constants.js")); +__export(__webpack_require__(/*! ./functions */ "./node_modules/opentracing/lib/functions.js")); +// Initialize the noops last to avoid a dependecy cycle between the classes. +Noop.initialize(); +//# sourceMappingURL=index.js.map -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} +/***/ }), -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) +/***/ "./node_modules/opentracing/lib/mock_tracer/index.js": +/*!***********************************************************!*\ + !*** ./node_modules/opentracing/lib/mock_tracer/index.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} +"use strict"; -function hexSlice (buf, start, end) { - var len = buf.length +Object.defineProperty(exports, "__esModule", { value: true }); +var mock_context_1 = __webpack_require__(/*! ./mock_context */ "./node_modules/opentracing/lib/mock_tracer/mock_context.js"); +exports.MockContext = mock_context_1.default; +var mock_span_1 = __webpack_require__(/*! ./mock_span */ "./node_modules/opentracing/lib/mock_tracer/mock_span.js"); +exports.MockSpan = mock_span_1.default; +var mock_tracer_1 = __webpack_require__(/*! ./mock_tracer */ "./node_modules/opentracing/lib/mock_tracer/mock_tracer.js"); +exports.MockTracer = mock_tracer_1.default; +//# sourceMappingURL=index.js.map - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len +/***/ }), - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} +/***/ "./node_modules/opentracing/lib/mock_tracer/mock_context.js": +/*!******************************************************************!*\ + !*** ./node_modules/opentracing/lib/mock_tracer/mock_context.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} +"use strict"; -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var opentracing = __webpack_require__(/*! ../index */ "./node_modules/opentracing/lib/index.js"); +/** + * OpenTracing Context implementation designed for use in + * unit tests. + */ +var MockContext = /** @class */ (function (_super) { + __extends(MockContext, _super); + function MockContext(span) { + var _this = _super.call(this) || this; + // Store a reference to the span itself since this is a mock tracer + // intended to make debugging and unit testing easier. + _this._span = span; + return _this; + } + MockContext.prototype.span = function () { + return this._span; + }; + return MockContext; +}(opentracing.SpanContext)); +exports.MockContext = MockContext; +exports.default = MockContext; +//# sourceMappingURL=mock_context.js.map - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } +/***/ }), - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } +/***/ "./node_modules/opentracing/lib/mock_tracer/mock_report.js": +/*!*****************************************************************!*\ + !*** ./node_modules/opentracing/lib/mock_tracer/mock_report.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (end < start) end = start +"use strict"; - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Index a collection of reported MockSpans in a way that's easy to run unit + * test assertions against. + */ +var MockReport = /** @class */ (function () { + function MockReport(spans) { + var _this = this; + this.spans = spans; + this.spansByUUID = {}; + this.spansByTag = {}; + this.debugSpans = []; + this.unfinishedSpans = []; + spans.forEach(function (span) { + if (span._finishMs === 0) { + _this.unfinishedSpans.push(span); + } + _this.spansByUUID[span.uuid()] = span; + _this.debugSpans.push(span.debug()); + var tags = span.tags(); + Object.keys(tags).forEach(function (key) { + var val = tags[key]; + _this.spansByTag[key] = _this.spansByTag[key] || {}; + _this.spansByTag[key][val] = _this.spansByTag[key][val] || []; + _this.spansByTag[key][val].push(span); + }); + }); } - } + MockReport.prototype.firstSpanWithTagValue = function (key, val) { + var m = this.spansByTag[key]; + if (!m) { + return null; + } + var n = m[val]; + if (!n) { + return null; + } + return n[0]; + }; + return MockReport; +}()); +exports.MockReport = MockReport; +exports.default = MockReport; +//# sourceMappingURL=mock_report.js.map - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} +/***/ }), -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +/***/ "./node_modules/opentracing/lib/mock_tracer/mock_span.js": +/*!***************************************************************!*\ + !*** ./node_modules/opentracing/lib/mock_tracer/mock_span.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 +"use strict"; - if (val >= mul) val -= Math.pow(2, 8 * byteLength) +/* eslint-disable import/no-extraneous-dependencies */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var opentracing = __webpack_require__(/*! ../index */ "./node_modules/opentracing/lib/index.js"); +var mock_context_1 = __webpack_require__(/*! ./mock_context */ "./node_modules/opentracing/lib/mock_tracer/mock_context.js"); +/** + * OpenTracing Span implementation designed for use in unit tests. + */ +var MockSpan = /** @class */ (function (_super) { + __extends(MockSpan, _super); + //------------------------------------------------------------------------// + // MockSpan-specific + //------------------------------------------------------------------------// + function MockSpan(tracer) { + var _this = _super.call(this) || this; + _this._mockTracer = tracer; + _this._uuid = _this._generateUUID(); + _this._startMs = Date.now(); + _this._finishMs = 0; + _this._operationName = ''; + _this._tags = {}; + _this._logs = []; + return _this; + } + //------------------------------------------------------------------------// + // OpenTracing implementation + //------------------------------------------------------------------------// + MockSpan.prototype._context = function () { + return new mock_context_1.default(this); + }; + MockSpan.prototype._setOperationName = function (name) { + this._operationName = name; + }; + MockSpan.prototype._addTags = function (set) { + var keys = Object.keys(set); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + this._tags[key] = set[key]; + } + }; + MockSpan.prototype._log = function (fields, timestamp) { + this._logs.push({ + fields: fields, + timestamp: timestamp + }); + }; + MockSpan.prototype._finish = function (finishTime) { + this._finishMs = finishTime || Date.now(); + }; + MockSpan.prototype.uuid = function () { + return this._uuid; + }; + MockSpan.prototype.operationName = function () { + return this._operationName; + }; + MockSpan.prototype.durationMs = function () { + return this._finishMs - this._startMs; + }; + MockSpan.prototype.tags = function () { + return this._tags; + }; + MockSpan.prototype.tracer = function () { + return this._mockTracer; + }; + MockSpan.prototype._generateUUID = function () { + var p0 = ("00000000" + Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)).substr(-8); + var p1 = ("00000000" + Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)).substr(-8); + return "" + p0 + p1; + }; + MockSpan.prototype.addReference = function (ref) { + }; + /** + * Returns a simplified object better for console.log()'ing. + */ + MockSpan.prototype.debug = function () { + var obj = { + uuid: this._uuid, + operation: this._operationName, + millis: [this._finishMs - this._startMs, this._startMs, this._finishMs] + }; + if (Object.keys(this._tags).length) { + obj.tags = this._tags; + } + return obj; + }; + return MockSpan; +}(opentracing.Span)); +exports.MockSpan = MockSpan; +exports.default = MockSpan; +//# sourceMappingURL=mock_span.js.map - return val -} +/***/ }), -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +/***/ "./node_modules/opentracing/lib/mock_tracer/mock_tracer.js": +/*!*****************************************************************!*\ + !*** ./node_modules/opentracing/lib/mock_tracer/mock_tracer.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 +"use strict"; - if (val >= mul) val -= Math.pow(2, 8 * byteLength) +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +// TODO: Move mock-tracer to its own NPM package once it is complete and tested. +var opentracing = __webpack_require__(/*! ../index */ "./node_modules/opentracing/lib/index.js"); +var mock_report_1 = __webpack_require__(/*! ./mock_report */ "./node_modules/opentracing/lib/mock_tracer/mock_report.js"); +var mock_span_1 = __webpack_require__(/*! ./mock_span */ "./node_modules/opentracing/lib/mock_tracer/mock_span.js"); +/** + * OpenTracing Tracer implementation designed for use in unit tests. + */ +var MockTracer = /** @class */ (function (_super) { + __extends(MockTracer, _super); + //------------------------------------------------------------------------// + // MockTracer-specific + //------------------------------------------------------------------------// + function MockTracer() { + var _this = _super.call(this) || this; + _this._spans = []; + return _this; + } + //------------------------------------------------------------------------// + // OpenTracing implementation + //------------------------------------------------------------------------// + MockTracer.prototype._startSpan = function (name, fields) { + // _allocSpan is given it's own method so that derived classes can + // allocate any type of object they want, but not have to duplicate + // the other common logic in startSpan(). + var span = this._allocSpan(); + span.setOperationName(name); + this._spans.push(span); + if (fields.references) { + for (var _i = 0, _a = fields.references; _i < _a.length; _i++) { + var ref = _a[_i]; + span.addReference(ref); + } + } + // Capture the stack at the time the span started + span._startStack = new Error().stack; + return span; + }; + MockTracer.prototype._inject = function (span, format, carrier) { + throw new Error('NOT YET IMPLEMENTED'); + }; + MockTracer.prototype._extract = function (format, carrier) { + throw new Error('NOT YET IMPLEMENTED'); + }; + MockTracer.prototype._allocSpan = function () { + return new mock_span_1.default(this); + }; + /** + * Discard any buffered data. + */ + MockTracer.prototype.clear = function () { + this._spans = []; + }; + /** + * Return the buffered data in a format convenient for making unit test + * assertions. + */ + MockTracer.prototype.report = function () { + return new mock_report_1.default(this._spans); + }; + return MockTracer; +}(opentracing.Tracer)); +exports.MockTracer = MockTracer; +exports.default = MockTracer; +//# sourceMappingURL=mock_tracer.js.map - return val -} +/***/ }), -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} +/***/ "./node_modules/opentracing/lib/noop.js": +/*!**********************************************!*\ + !*** ./node_modules/opentracing/lib/noop.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} +"use strict"; -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val +Object.defineProperty(exports, "__esModule", { value: true }); +var span_1 = __webpack_require__(/*! ./span */ "./node_modules/opentracing/lib/span.js"); +var span_context_1 = __webpack_require__(/*! ./span_context */ "./node_modules/opentracing/lib/span_context.js"); +var tracer_1 = __webpack_require__(/*! ./tracer */ "./node_modules/opentracing/lib/tracer.js"); +exports.tracer = null; +exports.spanContext = null; +exports.span = null; +// Deferred initialization to avoid a dependency cycle where Tracer depends on +// Span which depends on the noop tracer. +function initialize() { + exports.tracer = new tracer_1.default(); + exports.span = new span_1.default(); + exports.spanContext = new span_context_1.default(); } +exports.initialize = initialize; +//# sourceMappingURL=noop.js.map -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +/***/ }), - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} +/***/ "./node_modules/opentracing/lib/reference.js": +/*!***************************************************!*\ + !*** ./node_modules/opentracing/lib/reference.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +"use strict"; - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') +Object.defineProperty(exports, "__esModule", { value: true }); +var span_1 = __webpack_require__(/*! ./span */ "./node_modules/opentracing/lib/span.js"); +/** + * Reference pairs a reference type constant (e.g., REFERENCE_CHILD_OF or + * REFERENCE_FOLLOWS_FROM) with the SpanContext it points to. + * + * See the exported childOf() and followsFrom() functions at the package level. + */ +var Reference = /** @class */ (function () { + /** + * Initialize a new Reference instance. + * + * @param {string} type - the Reference type constant (e.g., + * REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM). + * @param {SpanContext} referencedContext - the SpanContext being referred + * to. As a convenience, a Span instance may be passed in instead + * (in which case its .context() is used here). + */ + function Reference(type, referencedContext) { + this._type = type; + this._referencedContext = (referencedContext instanceof span_1.default ? + referencedContext.context() : + referencedContext); } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) + /** + * @return {string} The Reference type (e.g., REFERENCE_CHILD_OF or + * REFERENCE_FOLLOWS_FROM). + */ + Reference.prototype.type = function () { + return this._type; + }; + /** + * @return {SpanContext} The SpanContext being referred to (e.g., the + * parent in a REFERENCE_CHILD_OF Reference). + */ + Reference.prototype.referencedContext = function () { + return this._referencedContext; + }; + return Reference; +}()); +exports.default = Reference; +//# sourceMappingURL=reference.js.map /***/ }), -/***/ "./node_modules/eventemitter3/index.js": -/*!*********************************************!*\ - !*** ./node_modules/eventemitter3/index.js ***! - \*********************************************/ +/***/ "./node_modules/opentracing/lib/span.js": +/*!**********************************************!*\ + !*** ./node_modules/opentracing/lib/span.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -// -// We store our EE objects in a plain object whose properties are event names. -// If `Object.create(null)` is not supported we prefix the event names with a -// `~` to make sure that the built-in object properties are not overridden or -// used as an attack vector. -// We also assume that `Object.create(null)` is available when the event name -// is an ES6 Symbol. -// -var prefix = typeof Object.create !== 'function' ? '~' : false; - -/** - * Representation of a single EventEmitter function. - * - * @param {Function} fn Event handler to be called. - * @param {Mixed} context Context for function execution. - * @param {Boolean} once Only emit once - * @api private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - +Object.defineProperty(exports, "__esModule", { value: true }); +var noop = __webpack_require__(/*! ./noop */ "./node_modules/opentracing/lib/noop.js"); /** - * Minimal EventEmitter interface that is molded against the Node.js - * EventEmitter interface. - * - * @constructor - * @api public + * Span represents a logical unit of work as part of a broader Trace. Examples + * of span might include remote procedure calls or a in-process function calls + * to sub-components. A Trace has a single, top-level "root" Span that in turn + * may have zero or more child Spans, which in turn may have children. */ -function EventEmitter() { /* Nothing to set */ } - -/** - * Holds the assigned EventEmitters by name. - * - * @type {Object} - * @private - */ -EventEmitter.prototype._events = undefined; - -/** - * Return a list of assigned event listeners. - * - * @param {String} event The events that should be listed. - * @param {Boolean} exists We only need to know if there are listeners. - * @returns {Array|Boolean} - * @api public - */ -EventEmitter.prototype.listeners = function listeners(event, exists) { - var evt = prefix ? prefix + event : event - , available = this._events && this._events[evt]; - - if (exists) return !!available; - if (!available) return []; - if (available.fn) return [available.fn]; - - for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { - ee[i] = available[i].fn; - } - - return ee; -}; - -/** - * Emit an event to all registered event listeners. - * - * @param {String} event The name of the event. - * @returns {Boolean} Indication if we've emitted an event. - * @api public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events || !this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if ('function' === typeof listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Register a new EventListener for the given event. - * - * @param {String} event Name of the event. - * @param {Functon} fn Callback function. - * @param {Mixed} context The context of the function. - * @api public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - var listener = new EE(fn, context || this) - , evt = prefix ? prefix + event : event; - - if (!this._events) this._events = prefix ? {} : Object.create(null); - if (!this._events[evt]) this._events[evt] = listener; - else { - if (!this._events[evt].fn) this._events[evt].push(listener); - else this._events[evt] = [ - this._events[evt], listener - ]; - } - - return this; -}; - -/** - * Add an EventListener that's only called once. - * - * @param {String} event Name of the event. - * @param {Function} fn Callback function. - * @param {Mixed} context The context of the function. - * @api public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - var listener = new EE(fn, context || this, true) - , evt = prefix ? prefix + event : event; - - if (!this._events) this._events = prefix ? {} : Object.create(null); - if (!this._events[evt]) this._events[evt] = listener; - else { - if (!this._events[evt].fn) this._events[evt].push(listener); - else this._events[evt] = [ - this._events[evt], listener - ]; - } - - return this; -}; - -/** - * Remove event listeners. - * - * @param {String} event The event we want to remove. - * @param {Function} fn The listener that we need to find. - * @param {Mixed} context Only remove listeners matching this context. - * @param {Boolean} once Only remove once listeners. - * @api public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events || !this._events[evt]) return this; - - var listeners = this._events[evt] - , events = []; - - if (fn) { - if (listeners.fn) { - if ( - listeners.fn !== fn - || (once && !listeners.once) - || (context && listeners.context !== context) - ) { - events.push(listeners); - } - } else { - for (var i = 0, length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn - || (once && !listeners[i].once) - || (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) { - this._events[evt] = events.length === 1 ? events[0] : events; - } else { - delete this._events[evt]; - } - - return this; -}; - -/** - * Remove all listeners or only the listeners for the specified event. - * - * @param {String} event The event want to remove all listeners for. - * @api public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - if (!this._events) return this; - - if (event) delete this._events[prefix ? prefix + event : event]; - else this._events = prefix ? {} : Object.create(null); - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// This function doesn't apply anymore. -// -EventEmitter.prototype.setMaxListeners = function setMaxListeners() { - return this; -}; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Expose the module. -// -if (true) { - module.exports = EventEmitter; -} - - -/***/ }), - -/***/ "./node_modules/google-protobuf/google-protobuf.js": -/*!*********************************************************!*\ - !*** ./node_modules/google-protobuf/google-protobuf.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global, Buffer) {var $jscomp={scope:{},getGlobal:function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return"jscomp_symbol_"+a+$jscomp.symbolCounter_++}; -$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();$jscomp.initSymbol();$jscomp.initSymbolIterator();var b=a[Symbol.iterator];if(b)return b.call(a);var c=0;return{next:function(){return cb;)--c in this?this[--a]=this[c]:delete this[a];return this};$jscomp.array.copyWithin$install=function(){$jscomp.array.installHelper_("copyWithin",$jscomp.array.copyWithin)}; -$jscomp.array.fill=function(a,b,c){var d=this.length||0;0>b&&(b=Math.max(0,d+b));if(null==c||c>d)c=d;c=Number(c);0>c&&(c=Math.max(0,d+c));for(b=Number(b||0);b>>0;if(0===a)return 32;var b=0;0===(a&4294901760)&&(a<<=16,b+=16);0===(a&4278190080)&&(a<<=8,b+=8);0===(a&4026531840)&&(a<<=4,b+=4);0===(a&3221225472)&&(a<<=2,b+=2);0===(a&2147483648)&&b++;return b};$jscomp.math.imul=function(a,b){a=Number(a);b=Number(b);var c=a&65535,d=b&65535;return c*d+((a>>>16&65535)*d+c*(b>>>16&65535)<<16>>>0)|0};$jscomp.math.sign=function(a){a=Number(a);return 0===a||isNaN(a)?a:0a&&-.25a&&-.25a?-b:b};$jscomp.math.acosh=function(a){a=Number(a);return Math.log(a+Math.sqrt(a*a-1))};$jscomp.math.asinh=function(a){a=Number(a);if(0===a)return a;var b=Math.log(Math.abs(a)+Math.sqrt(a*a+1));return 0>a?-b:b}; -$jscomp.math.atanh=function(a){a=Number(a);return($jscomp.math.log1p(a)-$jscomp.math.log1p(-a))/2};$jscomp.math.hypot=function(a,b,c){a=Number(a);b=Number(b);var d,e,f,g=Math.max(Math.abs(a),Math.abs(b));for(d=2;dg){a/=g;b/=g;f=a*a+b*b;for(d=2;da?-b:b};$jscomp.math.cbrt=function(a){if(0===a)return a;a=Number(a);var b=Math.pow(Math.abs(a),1/3);return 0>a?-b:b};$jscomp.number=$jscomp.number||{};$jscomp.number.isFinite=function(a){return"number"!==typeof a?!1:!isNaN(a)&&Infinity!==a&&-Infinity!==a};$jscomp.number.isInteger=function(a){return $jscomp.number.isFinite(a)?a===Math.floor(a):!1}; -$jscomp.number.isNaN=function(a){return"number"===typeof a&&isNaN(a)};$jscomp.number.isSafeInteger=function(a){return $jscomp.number.isInteger(a)&&Math.abs(a)<=$jscomp.number.MAX_SAFE_INTEGER};$jscomp.number.EPSILON=function(){return Math.pow(2,-52)}();$jscomp.number.MAX_SAFE_INTEGER=function(){return 9007199254740991}();$jscomp.number.MIN_SAFE_INTEGER=function(){return-9007199254740991}();$jscomp.object=$jscomp.object||{}; -$jscomp.object.assign=function(a,b){for(var c=1;cd||1114111=d?b+=String.fromCharCode(d):(d-=65536,b+=String.fromCharCode(d>>>10&1023|55296),b+=String.fromCharCode(d&1023|56320))}return b}; -$jscomp.string.repeat=function(a){var b=$jscomp.checkStringArgs(this,null,"repeat");if(0>a||1342177279>>=1)b+=b;return c};$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)}; -$jscomp.string.codePointAt=function(a){var b=$jscomp.checkStringArgs(this,null,"codePointAt"),c=b.length;a=Number(a)||0;if(0<=a&&ad||56319a||57343=e}; -$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)};$jscomp.string.endsWith=function(a,b){var c=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===b&&(b=c.length);for(var d=Math.max(0,Math.min(b|0,c.length)),e=a.length;0=e};$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)}; -var COMPILED=!0,goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}}; -goog.define=function(a,b){var c=b;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,a)?c=goog.global.CLOSURE_UNCOMPILED_DEFINES[a]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,a)&&(c=goog.global.CLOSURE_DEFINES[a]));goog.exportPath_(a,c)};goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG; -goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;goog.provide=function(a){if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; -goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)}; -goog.module.getInternal_=function(a){if(!COMPILED)return goog.isProvided_(a)?a in goog.loadedModules_?goog.loadedModules_[a]:goog.getObjectByName(a):null};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_}; -goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0}; -goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0}); -goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]};goog.addDependency=function(a,b,c,d){if(goog.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");for(var f=goog.dependencies_,g=0;e=b[g];g++)f.nameToPath[e]=a,f.pathIsModule[a]=!!d;for(d=0;b=c[d];d++)a in f.requires||(f.requires[a]={}),f.requires[a][b]=!0}}; -goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(a);if(goog.isProvided_(a))return goog.isInModuleLoader_()?goog.module.getInternal_(a):null;if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b)return goog.writeScripts_(b),null}a="goog.require could not find: "+a;goog.logToConsole_(a);throw Error(a);}}; -goog.basePath="";goog.nullFunction=function(){};goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER; -goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1==d?c.length: -d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(a){goog.importScript_("",'goog.retrieveAndExecModule_("'+a+'");')&&(goog.dependencies_.written[a]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&& -goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(b+"\n//# sourceURL="+a+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+b+"\n;return exports});\n//# sourceURL="+a+"\n"},goog.loadQueuedModules_=function(){var a=goog.queuedModules_.length;if(0\x3c/script>')},goog.appendScriptSrcNode_=function(a){var b=goog.global.document, -c=b.createElement("script");c.type="text/javascript";c.src=a;c.defer=!1;c.async=!1;b.head.appendChild(c)},goog.writeScriptTag_=function(a,b){if(goog.inHtmlDocument_()){var c=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==c.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}var d=goog.IS_OLD_IE_;void 0===b?d?(d=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",c.write('\n//\n// Note: relies on the global hostScriptElement variable defined above.\n//\nmodule.exports.parseScriptElementOptions = function (opts, browserOpts) {\n if (!hostScriptElement) {\n return;\n }\n\n let dataset = hostScriptElement.dataset;\n\n let accessToken = dataset.access_token;\n if (typeof accessToken === 'string' && accessToken.length > 0) {\n opts.access_token = accessToken;\n }\n\n let componentName = dataset.component_name;\n if (typeof componentName === 'string' && componentName.length > 0) {\n opts.component_name = componentName;\n }\n\n let collectorHost = dataset.collector_host;\n if (typeof collectorHost === 'string' && collectorHost.length > 0) {\n opts.collector_host = collectorHost;\n }\n let collectorPort = dataset.collector_port;\n if (collectorPort) {\n opts.collector_port = parseInt(collectorPort, 10);\n }\n let collectorPath = dataset.collector_path;\n if (typeof collectorPath === 'string' && collectorPath.length > 0) {\n opts.collector_path = collectorPath;\n }\n let collectorEncryption = dataset.collector_encryption;\n if (collectorEncryption) {\n opts.collector_encryption = collectorEncryption;\n }\n\n let enable = dataset.enable;\n if (typeof enable === 'string') {\n if (enable === 'true') {\n opts.enable = true;\n } else if (enable === 'false') {\n opts.enable = false;\n }\n }\n let verbosity = dataset.verbosity;\n if (typeof verbosity === 'string') {\n opts.verbosity = parseInt(verbosity, 10);\n }\n\n let init = dataset.init_global_tracer;\n if (typeof init === 'string') {\n if (init === 'true') {\n browserOpts.init_global_tracer = true;\n } else if (init === 'false') {\n browserOpts.init_global_tracer = false;\n }\n }\n\n // NOTE: this is a little inelegant as this is hard-coding support for a\n // \"plug-in\" option.\n if (typeof dataset.xhr_instrumentation === 'string' && dataset.xhr_instrumentation === 'true') {\n opts.xhr_instrumentation = true;\n }\n\n if (typeof dataset.instrument_page_load === 'string' && dataset.instrument_page_load === 'true') {\n opts.instrument_page_load = true;\n }\n};\n\n// Parses options out of the current URL query string. The query parameters use\n// the 'lightstep_' prefix to reduce the chance of collision with\n// application-specific query parameters.\n//\n// This mechanism is particularly useful for debugging purposes as it does not\n// require any code or configuration changes.\n//\nmodule.exports.parseURLQueryOptions = function (opts) {\n if (!window) {\n return;\n }\n\n let params = urlQueryParameters();\n if (params.lightstep_verbosity) {\n try {\n opts.verbosity = parseInt(params.lightstep_verbosity, 10);\n } catch (_ignored) { /* Ignored */ }\n }\n if (params.lightstep_log_to_console) {\n opts.log_to_console = true;\n }\n};\n","const optionsParser = require('./options_parser.js');\nconst util = require('./util');\n\nconst kRuntimeGUIDCookiePrefix = 'lightstep_guid';\nconst kSessionIDCookieKey = 'lightstep_session_id';\nconst kCookieTimeToLiveSeconds = 7 * 24 * 60 * 60;\n\nlet nowMicrosImp = (function () {\n // Is a hi-res timer available?\n if (window.performance &&\n window.performance.now &&\n window.performance.timing &&\n window.performance.timing.navigationStart) {\n let start = performance.timing.navigationStart;\n return function () {\n return Math.floor((start + performance.now()) * 1000.0);\n };\n }\n // The low-res timer is the best we can do\n return function () {\n return Date.now() * 1000.0;\n };\n}());\n\nclass PlatformBrowser {\n\n name() {\n return 'browser';\n }\n\n nowMicros() {\n return nowMicrosImp();\n }\n\n // Return the GUID to use for the runtime. The intention is to reuse the\n // GUID so that logically a single browser session looks like a single\n // runtime.\n runtimeGUID(groupName) {\n // Account for the groupName in the same that multiple apps or services\n // are running on the same domain (and should not share the same\n // runtime GUID).\n let cookieKey = `${kRuntimeGUIDCookiePrefix}/${groupName}`;\n let uuid = util.cookie(cookieKey) || this._generateLongUUID();\n util.cookie(cookieKey, uuid, kCookieTimeToLiveSeconds, '/');\n\n // Also create a session ID as well to give the server more information\n // to coordinate with.\n let sessionID = util.cookie(kSessionIDCookieKey) || this._generateLongUUID();\n util.cookie(kSessionIDCookieKey, sessionID, kCookieTimeToLiveSeconds, '/');\n\n return uuid;\n }\n\n generateUUID() {\n return this._generateLongUUID();\n }\n\n _generateLongUUID() {\n let p0 = `00000000${Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)}`.substr(-8);\n let p1 = `00000000${Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)}`.substr(-8);\n return `${p0}${p1}`;\n }\n\n onBeforeExit(...args) {\n if (window) {\n window.addEventListener('beforeunload', ...args);\n }\n }\n\n plugins(opts) {\n return [\n require('../../../plugins/instrument_xhr'),\n require('../../../plugins/instrument_document_load'),\n ];\n }\n\n options(imp) {\n let tracerOpts = {};\n let browserOpts = {};\n optionsParser.parseScriptElementOptions(tracerOpts, browserOpts);\n optionsParser.parseURLQueryOptions(tracerOpts, browserOpts);\n return tracerOpts;\n }\n\n static initLibrary(lib) {\n let tracerOpts = {};\n let browserOpts = {};\n optionsParser.parseScriptElementOptions(tracerOpts, browserOpts);\n\n if (browserOpts.init_global_tracer) {\n PlatformBrowser.initGlobalTracer(lib, tracerOpts);\n }\n }\n static initGlobalTracer(lib, opts) {\n if (typeof window !== 'object') {\n return;\n }\n if (typeof window.opentracing !== 'object') {\n return;\n }\n opentracing.initGlobalTracer(new lib.Tracer(opts)); // eslint-disable-line no-undef\n }\n\n tracerTags() {\n return {\n 'lightstep.tracer_platform' : 'browser',\n };\n }\n\n // There's no way to truly \"fatal\" on the browser; the best approximation\n // is an Error exception.\n fatal(message) {\n throw new Error(message);\n }\n\n localStoreGet(key) {\n if (!window.sessionStorage) {\n return null;\n }\n try {\n return JSON.parse(sessionStorage.getItem(`lightstep/${key}`));\n } catch (_ignored) {\n return null;\n }\n }\n\n localStoreSet(key, value) {\n if (!window.sessionStorage) {\n return;\n }\n try {\n sessionStorage.setItem(`lightstep/${key}`, JSON.stringify(value));\n } catch (_ignored) { /* Ignored */ }\n }\n}\n\nmodule.exports = PlatformBrowser;\n","module.exports = require('./generated/thrift_all.js').Thrift;\n","let proto = require('../../generated_proto/collector_pb.js');\n\nexport default class TransportBrowser {\n\n constructor() {\n this._host = '';\n this._port = 0;\n this._path = '';\n this._encryption = '';\n }\n\n ensureConnection(opts) {\n this._host = opts.collector_host;\n this._port = opts.collector_port;\n this._path = opts.collector_path;\n this._encryption = opts.collector_encryption;\n }\n\n report(detached, auth, report, done) {\n try {\n if (!detached) {\n this._reportAJAX(auth, report, done);\n }\n } catch (e) {\n return done(e, null);\n }\n }\n\n _reportAJAX(auth, report, done) {\n let reportProto = report.toProto(auth);\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/api/v2/reports`;\n let xhr = new XMLHttpRequest();\n xhr.responseType = 'arraybuffer';\n xhr.open('POST', url);\n // Note: the browser automatically sets 'Connection' and 'Content-Length'\n // and *does not* allow they to be set manually\n xhr.setRequestHeader('Accept', 'application/octet-stream');\n xhr.setRequestHeader('Content-Type', 'application/octet-stream');\n xhr.onreadystatechange = function () {\n if (this.readyState === 4) {\n let err = null;\n let resp = null;\n if (this.status !== 200) {\n err = new Error(`status code = ${this.status}`);\n } else if (!this.response) {\n err = new Error('unexpected empty response');\n } else {\n try {\n resp = proto.ReportResponse.deserializeBinary(this.response);\n } catch (exception) {\n err = exception;\n }\n }\n let jsonResp = {\n timing : {\n receive_micros : resp.getReceiveTimestamp(),\n transmit_micros : resp.getTransmitTimestamp(),\n },\n errors : resp.errors,\n };\n return done(err, jsonResp);\n }\n };\n let serialized = reportProto.serializeBinary();\n xhr.send(serialized);\n }\n}\n","export default class TransportBrowser {\n\n constructor() {\n this._host = '';\n this._port = 0;\n this._path = '';\n this._encryption = '';\n }\n\n ensureConnection(opts) {\n this._host = opts.collector_host;\n this._port = opts.collector_port;\n this._path = opts.collector_path;\n this._encryption = opts.collector_encryption;\n }\n\n report(detached, auth, report, done) {\n try {\n if (!detached) {\n this._reportAJAX(auth, report, done);\n } else {\n this._reportAsyncScript(auth, report, done);\n }\n } catch (e) {\n return done(e, null);\n }\n }\n\n _reportAJAX(auth, report, done) {\n let payload = JSON.stringify(report.toThrift());\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/api/v0/reports`;\n let xhr = new XMLHttpRequest();\n xhr.open('POST', url);\n // Note: the browser automatically sets 'Connection' and 'Content-Length'\n // and *does not* allow they to be set manually\n xhr.setRequestHeader('LightStep-Access-Token', auth.getAccessToken());\n xhr.setRequestHeader('Content-Type', 'application/json');\n //req.setRequestHeader('Content-Encoding', 'gzip');\n xhr.onreadystatechange = function () {\n if (this.readyState === 4) {\n let err = null;\n let resp = null;\n if (this.status !== 200) {\n err = new Error(`status code = ${this.status}`);\n } else if (!this.responseText) {\n err = new Error('unexpected empty response');\n } else {\n try {\n resp = JSON.parse(this.responseText);\n } catch (exception) {\n err = exception;\n }\n }\n return done(err, resp);\n }\n };\n xhr.send(payload);\n }\n\n // Do a \"tail flush\" using an async browser script load. This does not get\n // interrupted as a normal Thirft RPC would when navigating away from\n // the page.\n _reportAsyncScript(auth, report, done) {\n let authJSON = JSON.stringify(auth.toThrift());\n let reportJSON = JSON.stringify(report.toThrift());\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/_rpc/v1/reports/uri_encoded` +\n `?auth=${encodeURIComponent(authJSON)}` +\n `&report=${encodeURIComponent(reportJSON)}`;\n\n let elem = document.createElement('script');\n elem.async = true;\n elem.defer = true;\n elem.src = url;\n elem.type = 'text/javascript';\n\n let hostElem = document.getElementsByTagName('head')[0];\n if (hostElem) {\n hostElem.appendChild(elem);\n }\n return done(null, null);\n }\n}\n","/* eslint-disable */\n\n// This function is copied directly from https://github.com/litejs/browser-cookie-lite.\n// It is licensed under the MIT License and authored by Lauri Rooden.\nfunction cookie(name, value, ttl, path, domain, secure) {\n if (arguments.length > 1) {\n let newCookie = name + '=' + encodeURIComponent(value) +\n (ttl ? \"; expires=\" + new Date(+new Date()+(ttl*1000)).toUTCString() : '') +\n (path ? \"; path=\" + path : '') +\n (domain ? \"; domain=\" + domain : '') +\n (secure ? \"; secure\" : '');\n document.cookie = newCookie;\n return newCookie;\n }\n return decodeURIComponent(((\"; \"+document.cookie).split(\"; \"+name+\"=\")[1]||\"\").split(\";\")[0]);\n}\n\n/* eslint-enable */\n\nmodule.exports = {\n cookie : cookie,\n};\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport _each from '../_each'; // eslint-disable-line camelcase\nimport * as coerce from './coerce.js';\nlet proto = require('./generated_proto/collector_pb.js');\n\nexport default class ReportImp {\n constructor(runtime, oldestMicros, youngestMicros, spanRecords, internalLogs, counters, timestampOffsetMicros) {\n this._runtime = runtime;\n this._oldestMicros = oldestMicros;\n this._youngestMicros = youngestMicros;\n this._spanRecords = spanRecords;\n this._internalLogs = internalLogs;\n this._counters = counters;\n this._timestampOffsetMicros = timestampOffsetMicros;\n }\n\n getSpanRecords() {\n return this._spanRecords;\n }\n\n getInternalLogs() {\n return this._internalLogs;\n }\n\n getCounters() {\n return this._counters;\n }\n\n toThrift() {\n _each(this._spanRecords, (span) => {\n span.runtime_guid = this._runtimeGUID;\n });\n\n let thriftCounters = [];\n _each(this._counters, (value, key) => {\n if (value === 0) {\n return;\n }\n thriftCounters.push(new crouton_thrift.MetricsSample({\n name : coerce.toString(key),\n double_value : coerce.toNumber(value),\n }));\n });\n\n let thriftSpanRecords = [];\n _each(this._spanRecords, (spanRecord) => {\n thriftSpanRecords.push(spanRecord._toThrift());\n });\n\n return new crouton_thrift.ReportRequest({\n runtime : this._runtime.toThrift(),\n oldest_micros : this._oldestMicros,\n youngest_micros : this._youngestMicros,\n span_records : thriftSpanRecords,\n internal_logs : this._internalLogs,\n internal_metrics : new crouton_thrift.Metrics({\n counts : thriftCounters,\n }),\n timestamp_offset_micros : this._timestampOffsetMicros,\n });\n }\n\n toProto(auth) {\n let spansList = [];\n _each(this._spanRecords, (spanRecord) => {\n spansList.push(spanRecord._toProto());\n });\n\n let countsList = [];\n _each(this._counters, (count) => {\n let metricSample = new proto.MetricsSample();\n metricSample.setName(count.name);\n metricSample.setIntValue(count.int64_value);\n metricSample.setDoubleValue(count.double_value);\n countsList.push(metricSample);\n });\n\n let internalMetrics = new proto.InternalMetrics();\n internalMetrics.setCountsList(countsList);\n\n let reportProto = new proto.ReportRequest();\n reportProto.setAuth(auth.toProto());\n reportProto.setReporter(this._runtime.toProto());\n reportProto.setSpansList(spansList);\n reportProto.setTimestampOffsetMicros(this._timestampOffsetMicros);\n reportProto.setInternalMetrics(internalMetrics);\n return reportProto;\n }\n}\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport _each from '../_each'; // eslint-disable-line camelcase\nimport * as coerce from './coerce.js';\nlet proto = require('./generated_proto/collector_pb.js');\nlet converter = require('hex2dec');\nconst packageObject = require('../../package.json');\n\nexport default class RuntimeImp {\n constructor(runtimeGUID, startMicros, componentName, attributes) {\n this._runtimeGUID = runtimeGUID;\n this._startMicros = startMicros;\n this._componentName = componentName;\n this._attributes = attributes;\n }\n\n toThrift() {\n let thriftAttrs = [];\n _each(this._attributes, (val, key) => {\n thriftAttrs.push(new crouton_thrift.KeyValue({\n Key : coerce.toString(key),\n Value : coerce.toString(val),\n }));\n });\n\n // NOTE: for legacy reasons, the Thrift field is called \"group_name\"\n // but is semantically equivalent to the \"component_name\"\n return new crouton_thrift.Runtime({\n guid : this._runtimeGUID,\n start_micros : this._startMicros,\n group_name : this._componentName,\n attrs : thriftAttrs,\n });\n }\n\n toProto() {\n let tracerVersion = new proto.KeyValue();\n tracerVersion.setKey('lightstep.tracer_version');\n tracerVersion.setStringValue(packageObject.version);\n\n let tracerPlatform = new proto.KeyValue();\n tracerPlatform.setKey('lightstep.tracer_platform');\n tracerPlatform.setStringValue('browser');\n\n let componentName = new proto.KeyValue();\n componentName.setKey('lightstep.component_name');\n componentName.setStringValue(this._componentName);\n\n let reporterId = converter.hexToDec(this._runtimeGUID);\n\n let reporterProto = new proto.Reporter();\n reporterProto.setReporterId(reporterId);\n reporterProto.setTagsList([tracerVersion, tracerPlatform, componentName]);\n return reporterProto;\n }\n}\n","import _each from '../_each';\n\nexport default class SpanContextImp {\n\n // ---------------------------------------------------------------------- //\n // OpenTracing Implementation\n // ---------------------------------------------------------------------- //\n\n setBaggageItem(key, value) {\n this._baggage[key] = value;\n }\n\n getBaggageItem(key) {\n return this._baggage[key];\n }\n\n // ---------------------------------------------------------------------- //\n // LightStep Extensions\n // ---------------------------------------------------------------------- //\n\n // This is part of the formal OT API in Go; and will likely be supported\n // across platforms.\n //\n // https://github.com/opentracing/opentracing.github.io/issues/103\n forEachBaggageItem(f) {\n _each(this._baggage, (val, key) => {\n f(key, val);\n });\n }\n\n // ---------------------------------------------------------------------- //\n // Private methods\n // ---------------------------------------------------------------------- //\n\n constructor(spanGUID, traceGUID) {\n this._baggage = {};\n this._guid = spanGUID;\n this._traceGUID = traceGUID;\n }\n}\n","import * as coerce from './coerce.js';\nimport * as constants from '../constants';\nimport _each from '../_each';\nimport * as opentracing from 'opentracing';\nimport { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport LogRecordImp from './log_record_imp'; // eslint-disable-line camelcase\nlet converter = require('hex2dec');\nlet proto = require('./generated_proto/collector_pb.js');\nlet googleProtobufTimestampPB = require('google-protobuf/google/protobuf/timestamp_pb.js');\n\nexport default class SpanImp extends opentracing.Span {\n\n // ---------------------------------------------------------------------- //\n // opentracing.Span SPI\n // ---------------------------------------------------------------------- //\n\n _tracer() {\n return this._tracerImp;\n }\n\n _context() {\n return this._ctx;\n }\n\n _setOperationName(name) {\n this._operationName = `${name}`;\n }\n\n _addTags(keyValuePairs) {\n let self = this;\n _each(keyValuePairs, (value, key) => {\n self._tags[key] = value;\n });\n }\n\n _log(keyValuePairs, timestamp) {\n let self = this;\n const argumentType = typeof keyValuePairs;\n if (argumentType !== 'object') {\n self._tracerImp._error('Span.log() expects an object as its first argument');\n return;\n }\n\n let tsMicros = timestamp ?\n (timestamp * 1000) :\n self._tracerImp._platform.nowMicros();\n\n let record = new LogRecordImp(\n self._tracerImp.getLogFieldKeyHardLimit(),\n self._tracerImp.getLogFieldValueHardLimit(),\n tsMicros,\n keyValuePairs);\n self._log_records = self._log_records || [];\n self._log_records.push(record);\n self._tracerImp.emit('log_added', record);\n }\n\n _finish(finishTime) {\n return this.end(finishTime);\n }\n\n // ---------------------------------------------------------------------- //\n // Private methods\n // ---------------------------------------------------------------------- //\n\n constructor(tracer, name, spanContext) {\n super();\n\n console.assert(typeof tracer === 'object', 'Invalid runtime'); // eslint-disable-line no-console\n\n this._tracerImp = tracer;\n this._ctx = spanContext;\n this._ended = false;\n\n this._operationName = name;\n this._tags = {};\n this._beginMicros = tracer._platform.nowMicros();\n this._endMicros = 0;\n this._errorFlag = false;\n this._log_records = null;\n }\n\n // ---------------------------------------------------------------------- //\n // LightStep Extensions\n // ---------------------------------------------------------------------- //\n\n getOperationName() {\n return this._operationName;\n }\n\n // Getter only. The GUID is immutable once set internally.\n guid() {\n return this._ctx._guid;\n }\n\n traceGUID() {\n return this._ctx._traceGUID;\n }\n\n parentGUID() {\n return this._tags.parent_span_guid;\n }\n\n setParentGUID(guid) {\n this._tags.parent_span_guid = coerce.toString(guid);\n return this;\n }\n\n beginMicros() {\n return this._beginMicros;\n }\n\n setBeginMicros(micros) {\n this._beginMicros = micros;\n return this;\n }\n\n endMicros() {\n return this._endMicros;\n }\n\n setEndMicros(micros) {\n this._endMicros = micros;\n return this;\n }\n\n /**\n * Returns a URL to the trace containing this span.\n *\n * Unlike most methods, it *is* safe to call this method after `finish()`.\n *\n * @return {string} the absolute URL for the span\n */\n generateTraceURL() {\n let micros;\n if (this._beginMicros > 0 && this._endMicros > 0) {\n micros = Math.floor((this._beginMicros + this._endMicros) / 2);\n } else {\n micros = this._tracerImp._platform.nowMicros();\n }\n\n let urlPrefix = constants.LIGHTSTEP_APP_URL_PREFIX;\n let accessToken = encodeURIComponent(this._tracerImp.options().access_token);\n let guid = encodeURIComponent(this.guid());\n return `${urlPrefix}/${accessToken}/trace?span_guid=${guid}&at_micros=${micros}`;\n }\n\n getTags() {\n return this._tags;\n }\n\n /**\n * Finishes the span.\n *\n * @param {Number} finishTime\n * \tOptional Unix timestamp in milliseconds setting an explicit\n * \tfinish time for the span.\n */\n end(finishTime) {\n // Ensure a single span is not recorded multiple times\n if (this._ended) {\n return;\n }\n this._ended = true;\n\n if (finishTime !== undefined) {\n this._endMicros = finishTime * 1000;\n }\n\n // Do not set endMicros if it has already been set. This accounts for\n // the case of a span that has had it's times set manually (i.e. allows\n // for retroactively created spans that might not be possible to create\n // in real-time).\n if (this._endMicros === 0) {\n this._endMicros = this._tracerImp._platform.nowMicros();\n }\n this._tracerImp._addSpanRecord(this);\n }\n\n _toThrift() {\n let attributes = [];\n _each(this._tags, (value, key) => {\n attributes.push(new crouton_thrift.KeyValue({\n Key : coerce.toString(key),\n Value : coerce.toString(value),\n }));\n });\n\n let logs = [];\n _each(this._log_records, (logRecord) => {\n let logThrift = logRecord.toThrift();\n this._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit();\n this._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit();\n logs.push(logThrift);\n });\n\n return new crouton_thrift.SpanRecord({\n span_guid : this.guid(),\n trace_guid : this.traceGUID(),\n runtime_guid : this._tracerImp.guid(),\n span_name : this._operationName,\n oldest_micros : this._beginMicros,\n youngest_micros : this._endMicros,\n attributes : attributes,\n error_flag : this._errorFlag,\n log_records : logs,\n });\n }\n\n _toProto() {\n let spanContextProto = new proto.SpanContext();\n\n spanContextProto.setTraceId(converter.hexToDec(this.traceGUID()));\n spanContextProto.setSpanId(converter.hexToDec(this.guid()));\n\n let spanProto = new proto.Span();\n spanProto.setSpanContext(spanContextProto);\n spanProto.setOperationName(this._operationName);\n\n let startTimestamp = new googleProtobufTimestampPB.Timestamp();\n let startMillis = Math.floor(this._beginMicros / 1000);\n let startSeconds = Math.floor(startMillis / 1000);\n let startNanos = (startMillis % 1000) * 1000000;\n startTimestamp.setSeconds(startSeconds);\n startTimestamp.setNanos(startNanos);\n spanProto.setStartTimestamp(startTimestamp);\n spanProto.setDurationMicros(this._endMicros - this._beginMicros);\n\n let logs = [];\n _each(this._log_records, (logRecord) => {\n let logProto = logRecord.toProto();\n this._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit();\n this._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit();\n logs.push(logProto);\n });\n spanProto.setLogsList(logs);\n\n let parentSpanGUID = undefined;\n let tags = [];\n _each(this._tags, (value, key) => {\n let strValue = coerce.toString(value);\n let strKey = coerce.toString(key);\n let tag = new proto.KeyValue();\n if (strKey === 'parent_span_guid') {\n parentSpanGUID = strValue;\n }\n tag.setKey(strKey);\n tag.setStringValue(strValue);\n tags.push(tag);\n });\n spanProto.setTagsList(tags);\n\n if (parentSpanGUID !== undefined) {\n let ref = new proto.Reference();\n ref.setRelationship(proto.Reference.Relationship.CHILD_OF);\n let parentSpanContext = new proto.SpanContext();\n parentSpanContext.setSpanId(converter.hexToDec(parentSpanGUID));\n ref.setSpanContext(parentSpanContext);\n spanProto.setReferencesList([ref]);\n }\n\n return spanProto;\n }\n}\n","//============================================================================//\n// Imports\n//============================================================================//\n\nimport EventEmitter from 'eventemitter3';\nimport * as opentracing from 'opentracing';\n\nimport SpanContextImp from './span_context_imp';\nimport SpanImp from './span_imp';\nimport _each from '../_each';\nimport { Platform, ProtoTransport, ThriftTransport } from '../platform_abstraction_layer';\nimport AuthImp from './auth_imp';\nimport RuntimeImp from './runtime_imp';\nimport ReportImp from './report_imp';\n\nconst ClockState = require('./util/clock_state');\nconst LogBuilder = require('./log_builder');\nconst coerce = require('./coerce');\nconst constants = require('../constants');\nconst globals = require('./globals');\nconst packageObject = require('../../package.json');\nconst util = require('./util/util');\n\nconst CARRIER_TRACER_STATE_PREFIX = 'ot-tracer-';\nconst CARRIER_BAGGAGE_PREFIX = 'ot-baggage-';\n\nconst DEFAULT_COLLECTOR_HOSTNAME = 'collector.lightstep.com';\nconst DEFAULT_COLLECTOR_PORT_TLS = 443;\nconst DEFAULT_COLLECTOR_PORT_PLAIN = 80;\nconst DEFAULT_COLLECTOR_PATH = '';\n\n// Internal errors should be rare. Set a low limit to ensure a cascading failure\n// does not compound an existing problem by trying to send a great deal of\n// internal error data.\nconst MAX_INTERNAL_LOGS = 20;\n\nlet _singleton = null;\n\nexport default class Tracer extends opentracing.Tracer {\n\n constructor(opts) {\n super();\n\n this._delegateEventEmitterMethods();\n\n opts = opts || {};\n\n if (!_singleton) {\n globals.setOptions(opts);\n _singleton = this;\n }\n\n // Platform abstraction layer\n this._platform = new Platform(this);\n this._runtimeGUID = opts.guid || this.override_runtime_guid || null; // Set once the group name is set\n this._plugins = {};\n this._options = {};\n this._optionDescs = [];\n this._makeOptionsTable();\n\n this._opentracing = opentracing;\n if (opts.opentracing_module) {\n this._opentracing = opts.opentracing_module;\n }\n\n let now = this._platform.nowMicros();\n\n // The thrift authentication and runtime struct are created as soon as\n // the necessary initialization options are available.\n this._startMicros = now;\n this._auth = null;\n this._runtime = null;\n\n let logger = {\n warn : (msg, payload) => { this._warn(msg, payload); },\n error : (err, payload) => { this._error(err, payload); },\n };\n\n if (opts) {\n this._transport = opts.override_transport;\n }\n\n if (!this._transport) {\n if (opts.transport && opts.transport === 'proto') {\n this._transport = new ProtoTransport(logger);\n } else {\n this._transport = new ThriftTransport(logger);\n }\n }\n\n this._reportingLoopActive = false;\n this._reportYoungestMicros = now;\n this._reportTimer = null;\n this._reportErrorStreak = 0; // Number of consecutive errors\n this._lastVisibleErrorMillis = 0;\n this._skippedVisibleErrors = 0;\n\n // Set addActiveRootSpan() for detail\n this._activeRootSpanSet = {};\n this._activeRootSpan = null;\n\n // Span reporting buffer and per-report data\n // These data are reset on every successful report.\n this._spanRecords = [];\n\n // The counter names need to match those accepted by the collector.\n // These are internal counters only.\n this._counters = {\n 'internal.errors' : 0,\n 'internal.warnings' : 0,\n 'spans.dropped' : 0,\n 'logs.dropped' : 0,\n 'logs.keys.over_limit' : 0,\n 'logs.values.over_limit' : 0,\n 'reports.errors.send' : 0,\n };\n\n // For internal (not client) logs reported to the collector\n this._internalLogs = [];\n\n // Current runtime state / status\n this._flushIsActive = false;\n\n // Built-in plugins\n this.addPlugin(require('../plugins/log_to_console'));\n\n // Initialize the platform options after the built-in plugins in\n // case any of those options affect the built-ins.\n this.addPlatformPlugins(opts);\n this.setPlatformOptions(opts);\n\n // Set constructor arguments\n if (opts) {\n this.options(opts);\n }\n\n // For clock skew adjustment.\n // Must be set after options have been set.\n this._useClockState = !this._options.disable_clock_skew_correction;\n this._clockState = new ClockState({\n nowMicros : () => this._platform.nowMicros(),\n localStoreGet : () => {\n let key = `clock_state/${this._options.collector_host}`;\n return this._platform.localStoreGet(key);\n },\n localStoreSet : (value) => {\n let key = `clock_state/${this._options.collector_host}`;\n return this._platform.localStoreSet(key, value);\n },\n });\n\n // This relies on the options being set: call this last.\n this._setupReportOnExit();\n\n this._info(`Tracer created with guid ${this._runtimeGUID}`);\n\n this.startPlugins();\n }\n\n // Morally speaking, Tracer also inherits from EventEmmiter, but we must\n // fake it via composition.\n //\n // If not obvious on inspection: a hack.\n _delegateEventEmitterMethods() {\n let self = this;\n this._ee = new EventEmitter();\n // The list of methods at https://nodejs.org/api/events.html\n _each([\n 'addListener',\n 'emit',\n 'eventNames',\n 'getMaxListeners',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener',\n 'setMaxListeners',\n ], (methodName) => {\n self[methodName] = function () {\n if (self._ee[methodName]) {\n self._ee[methodName].apply(self._ee, arguments);\n }\n };\n });\n }\n\n _makeOptionsTable() {\n /* eslint-disable key-spacing, no-multi-spaces */\n\n // NOTE: make 'verbosity' the first option so it is processed first on\n // options changes and takes effect as soon as possible.\n this.addOption('verbosity', { type : 'int', min: 0, max: 9, defaultValue: 1 });\n\n // Core options\n this.addOption('access_token', { type: 'string', defaultValue: '' });\n this.addOption('component_name', { type: 'string', defaultValue: '' });\n this.addOption('collector_host', { type: 'string', defaultValue: DEFAULT_COLLECTOR_HOSTNAME });\n this.addOption('collector_port', { type: 'int', defaultValue: DEFAULT_COLLECTOR_PORT_TLS });\n this.addOption('collector_path', { type: 'string', defaultValue: DEFAULT_COLLECTOR_PATH });\n this.addOption('collector_encryption', { type: 'string', defaultValue: 'tls' });\n this.addOption('tags', { type: 'any', defaultValue: {} });\n this.addOption('max_reporting_interval_millis', { type: 'int', defaultValue: 2500 });\n this.addOption('disable_clock_skew_correction', { type: 'bool', defaultValue: false });\n\n // Non-standard, may be deprecated\n this.addOption('disabled', { type: 'bool', defaultValue: false });\n this.addOption('max_span_records', { type: 'int', defaultValue: 4096 });\n this.addOption('default_span_tags', { type: 'any', defaultValue: {} });\n this.addOption('report_timeout_millis', { type: 'int', defaultValue: 30000 });\n this.addOption('gzip_json_requests', { type: 'bool', defaultValue: true });\n this.addOption('disable_reporting_loop', { type: 'bool', defaultValue: false });\n this.addOption('disable_report_on_exit', { type: 'bool', defaultValue: false });\n this.addOption('delay_initial_report_millis', { type: 'int', defaultValue: 1000 });\n this.addOption('error_throttle_millis', { type: 'int', defaultValue: 60000 });\n\n // Debugging options\n //\n // These are not part of the supported public API.\n //\n // If false, SSL certificate verification is skipped. Useful for testing.\n this.addOption('certificate_verification', { type: 'bool', defaultValue: true });\n // I.e. report only on explicit calls to flush()\n\n // Unit testing options\n this.addOption('override_transport', { type : 'any', defaultValue: null });\n this.addOption('silent', { type : 'bool', defaultValue: false });\n\n // Hard upper limits to protect against worst-case scenarios for log field sizes.\n this.addOption('log_field_key_hard_limit', { type: 'int', defaultValue: 256 });\n this.addOption('log_field_value_hard_limit', { type: 'int', defaultValue: 1024 });\n\n /* eslint-disable key-spacing, no-multi-spaces */\n }\n\n // ---------------------------------------------------------------------- //\n // opentracing.Tracer SPI\n // ---------------------------------------------------------------------- //\n\n _startSpan(name, fields) {\n // First, assemble the SpanContextImp for our SpanImp.\n let parentCtxImp = null;\n fields = fields || {};\n if (fields.references) {\n for (let i = 0; i < fields.references.length; i++) {\n let ref = fields.references[i];\n let type = ref.type();\n if (type === this._opentracing.REFERENCE_CHILD_OF ||\n type === this._opentracing.REFERENCE_FOLLOWS_FROM) {\n let context = ref.referencedContext();\n if (!context) {\n this._error('Span reference has an invalid context', context);\n continue;\n }\n parentCtxImp = context;\n break;\n }\n }\n }\n\n let traceGUID = parentCtxImp ? parentCtxImp._traceGUID : this.generateTraceGUIDForRootSpan();\n let spanImp = new SpanImp(this, name, new SpanContextImp(this._platform.generateUUID(), traceGUID));\n spanImp.addTags(this._options.default_span_tags);\n\n _each(fields, (value, key) => {\n switch (key) {\n case 'references':\n // Ignore: handled before constructing the span\n break;\n case 'startTime':\n // startTime is in milliseconds\n spanImp.setBeginMicros(value * 1000);\n break;\n case 'tags':\n spanImp.addTags(value);\n break;\n default:\n this._warn(`Ignoring unknown field '${key}'`);\n break;\n }\n });\n\n if (parentCtxImp !== null) {\n spanImp.setParentGUID(parentCtxImp._guid);\n }\n\n this.emit('start_span', spanImp);\n return spanImp;\n }\n\n _inject(spanContext, format, carrier) {\n switch (format) {\n case this._opentracing.FORMAT_HTTP_HEADERS:\n case this._opentracing.FORMAT_TEXT_MAP:\n this._injectToTextMap(spanContext, carrier);\n break;\n\n case this._opentracing.FORMAT_BINARY:\n this._error(`Unsupported format: ${format}`);\n break;\n\n default:\n this._error(`Unknown format: ${format}`);\n break;\n }\n }\n\n _injectToTextMap(spanContext, carrier) {\n if (!carrier) {\n this._error('Unexpected null FORMAT_TEXT_MAP carrier in call to inject');\n return;\n }\n if (typeof carrier !== 'object') {\n this._error(`Unexpected '${typeof carrier}' FORMAT_TEXT_MAP carrier in call to inject`);\n return;\n }\n\n carrier[`${CARRIER_TRACER_STATE_PREFIX}spanid`] = spanContext._guid;\n carrier[`${CARRIER_TRACER_STATE_PREFIX}traceid`] = spanContext._traceGUID;\n spanContext.forEachBaggageItem((key, value) => {\n carrier[`${CARRIER_BAGGAGE_PREFIX}${key}`] = value;\n });\n carrier[`${CARRIER_TRACER_STATE_PREFIX}sampled`] = 'true';\n return carrier;\n }\n\n _extract(format, carrier) {\n switch (format) {\n case this._opentracing.FORMAT_HTTP_HEADERS:\n case this._opentracing.FORMAT_TEXT_MAP:\n return this._extractTextMap(format, carrier);\n\n case this._opentracing.FORMAT_BINARY:\n this._error(`Unsupported format: ${format}`);\n return null;\n\n default:\n this._error(`Unsupported format: ${format}`);\n return null;\n }\n }\n\n _extractTextMap(format, carrier) {\n // Begin with the empty SpanContextImp\n let spanContext = new SpanContextImp(null, null);\n\n // Iterate over the contents of the carrier and set the properties\n // accordingly.\n let foundFields = 0;\n _each(carrier, (value, key) => {\n key = key.toLowerCase();\n if (key.substr(0, CARRIER_TRACER_STATE_PREFIX.length) !== CARRIER_TRACER_STATE_PREFIX) {\n return;\n }\n let suffix = key.substr(CARRIER_TRACER_STATE_PREFIX.length);\n\n switch (suffix) {\n case 'traceid':\n foundFields++;\n spanContext._traceGUID = value;\n break;\n case 'spanid':\n foundFields++;\n spanContext._guid = value;\n break;\n case 'sampled':\n // Ignored. The carrier may be coming from a different client\n // library that sends this (even though it's not used).\n break;\n default:\n this._error(`Unrecognized carrier key '${key}' with recognized prefix. Ignoring.`);\n break;\n }\n });\n\n if (foundFields === 0) {\n // This is not an error per se, there was simply no SpanContext\n // in the carrier.\n return null;\n }\n if (foundFields < 2) {\n // A partial SpanContext suggests some sort of data corruption.\n this._error(`Only found a partial SpanContext: ${format}, ${carrier}`);\n return null;\n }\n\n _each(carrier, (value, key) => {\n key = key.toLowerCase();\n if (key.substr(0, CARRIER_BAGGAGE_PREFIX.length) !== CARRIER_BAGGAGE_PREFIX) {\n return;\n }\n let suffix = key.substr(CARRIER_BAGGAGE_PREFIX.length);\n spanContext.setBaggageItem(suffix, value);\n });\n return spanContext;\n }\n\n\n // ---------------------------------------------------------------------- //\n // LightStep extensions\n // ---------------------------------------------------------------------- //\n\n /**\n * Manually sends a report of all buffered data.\n *\n * @param {Function} done - callback function invoked when the report\n * either succeeds or fails.\n */\n flush(done) {\n if (!done) {\n done = function () {};\n }\n if (this._options.disabled) {\n this._warn('Manual flush() called in disabled state.');\n return done(null);\n }\n this._flushReport(true, false, done);\n }\n\n //-----------------------------------------------------------------------//\n // Options\n //-----------------------------------------------------------------------//\n\n guid() {\n return this._runtimeGUID;\n }\n\n verbosity() {\n // The 'undefined' handling below is for logs that may occur before the\n // options are initialized.\n let v = this._options.verbosity;\n return (v === undefined) ? 1 : v;\n }\n\n // Call to generate a new Trace GUID\n generateTraceGUIDForRootSpan() {\n let guid = this._platform.generateUUID();\n if (this._activeRootSpan) {\n guid = this._activeRootSpan.traceGUID();\n }\n return guid;\n }\n\n setPlatformOptions(userOptions) {\n let opts = this._platform.options(this) || {};\n _each(userOptions, (val, key) => {\n opts[key] = val;\n });\n this.options(opts);\n }\n\n // Register a new option. Used by plug-ins.\n addOption(name, desc) {\n desc.name = name;\n this._optionDescs.push(desc);\n this._options[desc.name] = desc.defaultValue;\n }\n\n options(opts) {\n if (arguments.length === 0) {\n console.assert(typeof this._options === 'object', // eslint-disable-line\n 'Internal error: _options field incorrect');\n return this._options;\n }\n if (typeof opts !== 'object') {\n throw new Error(`options() must be called with an object: type was ${typeof opts}`);\n }\n\n // \"collector_port\" 0 acts as an alias for \"use the default\".\n if (opts.collector_port === 0) {\n delete opts.collector_port;\n }\n\n // \"collector_encryption\" acts an alias for the common cases of 'collector_port'\n if (opts.collector_encryption !== undefined && opts.collector_port === undefined) {\n opts.collector_port = opts.collector_encryption !== 'none' ?\n DEFAULT_COLLECTOR_PORT_TLS :\n DEFAULT_COLLECTOR_PORT_PLAIN;\n }\n\n // Track what options have been modified\n let modified = {};\n let unchanged = {};\n _each(this._optionDescs, (desc) => {\n this._setOptionInternal(modified, unchanged, opts, desc);\n });\n\n // Check for any invalid options: is there a key in the specified operation\n // that didn't result either in a change or a reset to the existing value?\n for (let key in opts) {\n if (modified[key] === undefined && unchanged[key] === undefined) {\n this._warn(`Invalid option ${key} with value ${opts[key]}`);\n }\n }\n\n //\n // Update the state information based on the changes\n //\n this._initReportingDataIfNeeded(modified);\n\n if (!this._reportingLoopActive) {\n this._startReportingLoop();\n }\n\n if (this.verbosity() >= 3) {\n let optionsString = '';\n let count = 0;\n _each(modified, (val, key) => {\n optionsString += `\\t${JSON.stringify(key)}: ${JSON.stringify(val.newValue)}\\n`;\n count++;\n });\n if (count > 0) {\n this._debug(`Options modified:\\n${optionsString}`);\n }\n }\n this.emit('options', modified, this._options, this);\n }\n\n _setOptionInternal(modified, unchanged, opts, desc) {\n let name = desc.name;\n let value = opts[name];\n let valueType = typeof value;\n if (value === undefined) {\n return;\n }\n\n // Parse the option (and check constraints)\n switch (desc.type) {\n\n case 'any':\n break;\n\n case 'bool':\n if (value !== true && value !== false) {\n this._error(`Invalid boolean option '${name}' '${value}'`);\n return;\n }\n break;\n\n case 'int':\n if (valueType !== 'number' || Math.floor(value) !== value) {\n this._error(`Invalid int option '${name}' '${value}'`);\n return;\n }\n if (desc.min !== undefined && desc.max !== undefined) {\n if (!(value >= desc.min && value <= desc.max)) {\n this._error(`Option '${name}' out of range '${value}' is not between ${desc.min} and ${desc.max}`); // eslint-disable-line max-len\n return;\n }\n }\n break;\n\n case 'string':\n switch (valueType) {\n case 'string':\n break;\n case 'number':\n value = coerce.toString(value);\n break;\n default:\n this._error(`Invalid string option ${name} ${value}`);\n return;\n }\n break;\n\n case 'array':\n // Per http://stackoverflow.com/questions/4775722/check-if-object-is-array\n if (Object.prototype.toString.call(value) !== '[object Array]') {\n this._error(`Invalid type for array option ${name}: found '${valueType}'`);\n return;\n }\n break;\n\n default:\n this._error(`Unknown option type '${desc.type}'`);\n return;\n }\n\n // Set the new value, recording any modifications\n let oldValue = this._options[name];\n if (oldValue === undefined) {\n throw new Error(`Attempt to set unknown option ${name}`);\n }\n\n // Ignore no-op changes for types that can be checked quickly\n if (valueType !== 'object' && oldValue === value) {\n unchanged[name] = true;\n return;\n }\n\n modified[name] = {\n oldValue : oldValue,\n newValue : value,\n };\n this._options[name] = value;\n }\n\n // The authorization and runtime information is initialized as soon\n // as it is available. This allows logs and spans to be buffered before\n // the library is initialized, which can be helpul in a complex setup with\n // many subsystems.\n //\n _initReportingDataIfNeeded(modified) {\n // Ignore redundant initialization; complaint on inconsistencies\n if (this._auth !== null) {\n if (!this._runtime) {\n return this._error('Inconsistent state: auth initialized without runtime.');\n }\n if (modified.access_token) {\n throw new Error('Cannot change access_token after it has been set.');\n }\n if (modified.component_name) {\n throw new Error('Cannot change component_name after it has been set.');\n }\n if (modified.collector_host) {\n throw new Error('Cannot change collector_host after the connection is established');\n }\n if (modified.collector_port) {\n throw new Error('Cannot change collector_port after the connection is established');\n }\n if (modified.collector_path) {\n throw new Error('Cannot change collector_path after the connection is established');\n }\n if (modified.collector_encryption) {\n throw new Error('Cannot change collector_encryption after the connection is established');\n }\n return;\n }\n\n // See if the Thrift data can be initialized\n if (this._options.access_token.length > 0 && this._options.component_name.length > 0) {\n this._runtimeGUID = this._platform.runtimeGUID(this._options.component_name);\n\n this._auth = new AuthImp(this._options.access_token);\n\n //\n // Assemble the tracer tags from the user-specified and automatic,\n // internal tags.\n //\n let tags = {};\n _each(this._options.tags, (value, key) => {\n if (typeof value !== 'string') {\n this._error(`Tracer tag value is not a string: key=${key}`);\n return;\n }\n tags[key] = value;\n });\n tags['lightstep.tracer_version'] = packageObject.version;\n let platformTags = this._platform.tracerTags();\n _each(platformTags, (val, key) => {\n tags[key] = val;\n });\n\n this._runtime = new RuntimeImp(this._runtimeGUID, this._startMicros, this._options.component_name, tags);\n\n this._info('Initializing thrift reporting data', {\n component_name : this._options.component_name,\n access_token : this._auth.getAccessToken(),\n });\n this.emit('reporting_initialized');\n }\n }\n\n getLogFieldKeyHardLimit() {\n return this._options.log_field_key_hard_limit;\n }\n\n getLogFieldValueHardLimit() {\n return this._options.log_field_value_hard_limit;\n }\n\n //-----------------------------------------------------------------------//\n // Plugins\n //-----------------------------------------------------------------------//\n\n addPlatformPlugins(opts) {\n let pluginSet = this._platform.plugins(opts);\n _each(pluginSet, (val) => {\n this.addPlugin(val);\n });\n }\n\n addPlugin(plugin) {\n // Don't add plug-ins twice\n let name = plugin.name();\n if (this._plugins[name]) {\n return;\n }\n\n this._plugins[name] = plugin;\n plugin.addOptions(this);\n }\n\n startPlugins() {\n _each(this._plugins, (val, key) => {\n this._plugins[key].start(this);\n });\n }\n\n //-----------------------------------------------------------------------//\n // Spans\n //-----------------------------------------------------------------------//\n\n // This is a LightStep-specific feature that should be used sparingly. It\n // sets a \"global\" root span such that spans that would *otherwise* be root\n // span instead inherit the trace GUID of the active root span. This is\n // best clarified by example:\n //\n // On document load in the browser, an \"active root span\" is created for\n // the page load process. Any spans started without an explicit parent\n // will the document load trace GUID instead of starting a trace GUID.\n // This implicit root remains active only until the page is done loading.\n //\n // Any span adding itself as a root span *must* remove itself along with\n // calling finish(). This will *not* be done automatically.\n //\n // NOTE: currently, only the trace GUID is transferred; it may or may not\n // make sure to make this a proper parent.\n //\n // NOTE: the root span tracking is handled as a set rather than a single\n // global to avoid conflicts between libraries.\n addActiveRootSpan(span) {\n this._activeRootSpanSet[span._guid] = span;\n this._setActiveRootSpanToYoungest();\n }\n\n removeActiveRootSpan(span) {\n delete this._activeRootSpanSet[span._guid];\n this._setActiveRootSpanToYoungest();\n }\n\n _setActiveRootSpanToYoungest() {\n // Set the _activeRootSpan to the youngest of the roots in case of\n // multiple.\n this._activeRootSpan = null;\n _each(this._activeRootSpanSet, (span) => {\n if (!this._activeRootSpan ||\n span._beginMicros > this._activeRootSpan._beginMicros) {\n this._activeRootSpan = span;\n }\n });\n }\n\n //-----------------------------------------------------------------------//\n // Encoding / decoding\n //-----------------------------------------------------------------------//\n\n _objectToUint8Array(obj) {\n let jsonString;\n try {\n // encodeURIComponent() is a *very* inefficient, but simple and\n // well-supported way to avoid having to think about Unicode in\n // in the conversion to a UInt8Array.\n //\n // Writing multiple bytes for String.charCodeAt and\n // String.codePointAt would be an alternate approach; again,\n // simplicitly is being preferred over efficiency for the moment.\n jsonString = encodeURIComponent(JSON.stringify(obj));\n } catch (e) {\n this._error('Could not binary encode carrier data.');\n return null;\n }\n\n let buffer = new ArrayBuffer(jsonString.length);\n let view = new Uint8Array(buffer);\n for (let i = 0; i < jsonString.length; i++) {\n let code = jsonString.charCodeAt(i);\n if (!(code >= 0 && code <= 255)) {\n this._error('Unexpected character code');\n return null;\n }\n view[i] = code;\n }\n return view;\n }\n\n _uint8ArrayToObject(arr) {\n if (!arr) {\n this._error('Array is null');\n return null;\n }\n\n let jsonString = '';\n for (let i = 0; i < arr.length; i++) {\n jsonString += String.fromCharCode(arr[i]);\n }\n try {\n return JSON.parse(decodeURIComponent(jsonString));\n } catch (e) {\n this._error('Could not decode binary data.');\n return null;\n }\n }\n\n //-----------------------------------------------------------------------//\n // Logging\n //-----------------------------------------------------------------------//\n\n log() {\n let b = new LogBuilder(this);\n return b;\n }\n\n //-----------------------------------------------------------------------//\n // Buffers\n //-----------------------------------------------------------------------//\n\n _clearBuffers() {\n this._spanRecords = [];\n this._internalLogs = [];\n\n // Create a new object to avoid overwriting the values in any references\n // to the old object\n let counters = {};\n _each(this._counters, (unused, key) => {\n counters[key] = 0;\n });\n this._counters = counters;\n }\n\n _buffersAreEmpty() {\n if (this._spanRecords.length > 0) {\n return false;\n }\n if (this._internalLogs.length > 0) {\n return false;\n }\n\n let countersAllZero = true;\n _each(this._counters, (val) => {\n if (val > 0) {\n countersAllZero = false;\n }\n });\n return countersAllZero;\n }\n\n _addSpanRecord(record) {\n this._internalAddSpanRecord(record);\n this.emit('span_added', record);\n }\n\n _internalAddSpanRecord(record) {\n if (!record) {\n this._error('Attempt to add null record to buffer');\n return;\n }\n\n if (this._spanRecords.length >= this._options.max_span_records) {\n let index = Math.floor(this._spanRecords.length * Math.random());\n this._spanRecords[index] = record;\n this._counters['spans.dropped']++;\n } else {\n this._spanRecords.push(record);\n }\n }\n\n _restoreRecords(spans, internalLogs, counters) {\n _each(spans, (span) => {\n this._internalAddSpanRecord(span);\n });\n\n let currentInternalLogs = this._internalLogs;\n this._internalLogs = [];\n let toAdd = internalLogs.concat(currentInternalLogs);\n _each(toAdd, (log) => {\n this._pushInternalLog(log);\n });\n\n _each(counters, (value, key) => {\n if (key in this._counters) {\n this._counters[key] += value;\n } else {\n this._error(`Bad counter name: ${key}`);\n }\n });\n }\n\n //-----------------------------------------------------------------------//\n // Reporting loop\n //-----------------------------------------------------------------------//\n\n _setupReportOnExit() {\n if (this._options.disable_report_on_exit) {\n this._debug('report-on-exit is disabled.');\n return;\n }\n\n // Do a final explicit flush. Note that the final flush may enqueue\n // asynchronous callbacks that cause the 'beforeExit' event to be\n // re-emitted when those callbacks finish.\n let finalFlushOnce = 0;\n let finalFlush = () => {\n if (finalFlushOnce++ > 0) { return; }\n this._info('Final flush before exit.');\n this._flushReport(false, true, (err) => {\n if (err) {\n this._warn('Final report before exit failed', {\n error : err,\n unflushed_spans : this._spanRecords.length,\n buffer_youngest_micros : this._reportYoungestMicros,\n });\n }\n });\n };\n this._platform.onBeforeExit(finalFlush);\n }\n\n _startReportingLoop() {\n if (this._options.disabled) {\n this._info('Not starting reporting loop: instrumentation is disabled.');\n return;\n }\n if (this._options.disable_reporting_loop) {\n this._info('Not starting reporting loop: reporting loop is disabled.');\n return;\n }\n if (this._auth === null) {\n // Don't start the loop until the thrift data necessary to do the\n // report is set up.\n return;\n }\n if (this._reportingLoopActive) {\n this._info('Reporting loop already started!');\n return;\n }\n\n this._info('Starting reporting loop:', this._runtime);\n this._reportingLoopActive = true;\n\n // Stop the reporting loop so the Node.js process does not become a\n // zombie waiting for the timers.\n let stopReportingOnce = 0;\n let stopReporting = () => {\n if (stopReportingOnce++ > 0) { return; }\n this._stopReportingLoop();\n };\n this._platform.onBeforeExit(stopReporting);\n\n // Begin the asynchronous reporting loop\n let loop = () => {\n this._enqueueNextReport((err) => {\n if (this._reportingLoopActive) {\n loop();\n }\n });\n };\n\n const delay = Math.floor(Math.random() * this._options.delay_initial_report_millis);\n util.detachedTimeout(() => {\n loop();\n }, delay);\n }\n\n _stopReportingLoop() {\n this._debug('Stopping reporting loop');\n\n this._reportingLoopActive = false;\n clearTimeout(this._reportTimer);\n this._reportTimer = null;\n }\n\n _enqueueNextReport(done) {\n // If there's already a report request enqueued, ignore this new\n // request.\n if (this._reportTimer) {\n return;\n }\n\n // If the clock state is still being primed, potentially use the\n // shorted report interval.\n //\n // However, do not use the shorter interval in the case of an error.\n // That does not provide sufficient backoff.\n let reportInterval = this._options.max_reporting_interval_millis;\n if (this._reportErrorStreak === 0 &&\n this._useClockState &&\n !this._clockState.isReady()) {\n reportInterval = Math.min(constants.CLOCK_STATE_REFRESH_INTERVAL_MS, reportInterval);\n }\n\n // After 3 consecutive errors, expand the retry delay up to 8x the\n // normal interval, jitter the delay by +/- 25%, and be sure to back off\n // *at least* the standard reporting interval in the case of an error.\n let backOff = 1 + Math.min(7, Math.max(0, this._reportErrorStreak));\n let basis = backOff * reportInterval;\n let jitter = 1.0 + (Math.random() * 0.5 - 0.25);\n let delay = Math.floor(Math.max(0, jitter * basis));\n\n this._debug(`Delaying next flush for ${delay}ms`);\n this._reportTimer = util.detachedTimeout(() => {\n this._reportTimer = null;\n this._flushReport(false, false, done);\n }, delay);\n }\n\n /**\n * Internal worker for a flush of buffered data into a report.\n *\n * @param {bool} manual - this is a manually invoked flush request. Don't\n * override this call with a clock state syncing flush, for example.\n * @param {bool} detached - this is an \"at exit\" flush that should not block\n * the calling process in any manner. This is specifically called\n * \"detached\" due to the browser use case where the report is done,\n * not just asynchronously, but as a script request that continues\n * to run even if the page is navigated away from mid-request.\n * @param {function} done - standard callback function called on success\n * or error.\n */\n _flushReport(manual, detached, done) {\n done = done || function (err) {};\n\n let clockReady = this._clockState.isReady();\n let clockOffsetMicros = this._clockState.offsetMicros();\n\n // Diagnostic information on the clock correction\n this._debug('time correction state', {\n offset_micros : clockOffsetMicros,\n active_samples : this._clockState.activeSampleCount(),\n ready : clockReady,\n });\n\n let spanRecords = this._spanRecords;\n let counters = this._counters;\n let internalLogs = this._internalLogs;\n\n // If the clock is not ready, do an \"empty\" flush to build more clock\n // samples before the real data is reported.\n // A detached flush (i.e. one intended to fire at exit or other \"last\n // ditch effort\" event) should always use the real data.\n if (this._useClockState && !manual && !clockReady && !detached) {\n this._debug('Flushing empty report to prime clock state');\n spanRecords = [];\n counters = {};\n internalLogs = [];\n } else {\n // Early out if we can.\n if (this._buffersAreEmpty()) {\n this._debug('Skipping empty report');\n return done(null);\n }\n\n // Clear the object buffers as the data is now in the local\n // variables\n this._clearBuffers();\n this._debug(`Flushing report (${spanRecords.length} spans)`);\n }\n\n this._transport.ensureConnection(this._options);\n\n // Ensure the runtime GUID is set as it is possible buffer logs and\n // spans before the GUID is necessarily set.\n console.assert(this._runtimeGUID !== null, 'No runtime GUID for Tracer'); // eslint-disable-line no-console\n\n let timestampOffset = this._useClockState ? clockOffsetMicros : 0;\n let now = this._platform.nowMicros();\n let report = new ReportImp(this._runtime, this._reportYoungestMicros, now,\n spanRecords, internalLogs, counters, timestampOffset);\n\n this.emit('prereport', report);\n let originMicros = this._platform.nowMicros();\n\n this._transport.report(detached, this._auth, report, (err, res) => {\n let destinationMicros = this._platform.nowMicros();\n let reportWindowSeconds = (now - report.oldest_micros) / 1e6;\n\n if (err) {\n // How many errors in a row? Influences the report backoff.\n this._reportErrorStreak++;\n\n // On a failed report, re-enqueue the data that was going to be\n // sent.\n let errString;\n if (err.message) {\n errString = `${err.message}`;\n } else {\n errString = `${err}`;\n }\n this._warn(`Error in report: ${errString}`, {\n last_report_seconds_ago : reportWindowSeconds,\n });\n\n this._restoreRecords(\n report.getSpanRecords(),\n report.getInternalLogs(),\n report.getCounters());\n\n // Increment the counter *after* the counters are restored\n this._counters['reports.errors.send']++;\n\n this.emit('report_error', err, {\n error : err,\n streak : this._reportErrorStreak,\n detached : detached,\n });\n } else {\n if (this.verbosity() >= 4) {\n this._debug(`Report flushed for last ${reportWindowSeconds} seconds`, {\n spans_reported : report.getSpanRecords().length,\n });\n }\n\n // Update internal data after the successful report\n this._reportErrorStreak = 0;\n this._reportYoungestMicros = now;\n\n // Update the clock state if there's info from the report\n if (res) {\n if (res.timing && res.timing.receive_micros && res.timing.transmit_micros) {\n this._clockState.addSample(\n originMicros,\n res.timing.receive_micros,\n res.timing.transmit_micros,\n destinationMicros);\n } else {\n // The response does not have timing information. Disable\n // the clock state assuming there'll never be timing data\n // to use.\n this._useClockState = false;\n }\n\n if (res.errors && res.errors.length > 0) {\n this._warn('Errors in report', res.errors);\n }\n } else {\n this._useClockState = false;\n }\n\n this.emit('report', report, res);\n }\n return done(err);\n });\n }\n\n //-----------------------------------------------------------------------//\n // Stats and metrics\n //-----------------------------------------------------------------------//\n\n /**\n * Internal API that returns some internal metrics.\n */\n stats() {\n return {\n counters : this._counters,\n };\n }\n\n //-----------------------------------------------------------------------//\n // Internal logging & errors\n //-----------------------------------------------------------------------//\n // The rules for how internal logs are processed:\n //\n // * Internal logs that are included in the Collector report:\n // - Always send errors logs along with the reports\n // - Never include any other logs\n // * Internal logs that are echoed to the host application:\n // - See the README.md :)\n //\n _debug(msg, payload) {\n if (this.verbosity() < 4) {\n return;\n }\n this._printToConsole('log', `[LightStep:DEBUG] ${msg}`, payload);\n }\n\n _info(msg, payload) {\n if (this.verbosity() < 3) {\n return;\n }\n this._printToConsole('log', `[LightStep:INFO] ${msg}`, payload);\n }\n\n _warn(msg, payload) {\n this._counters['internal.warnings']++;\n\n if (this.verbosity() < 3) {\n return;\n }\n this._printToConsole('warn', `[LightStep:WARN] ${msg}`, payload);\n }\n\n _error(msg, payload) {\n this._counters['internal.errors']++;\n\n // Internal errors are always reported to the collector\n let record = this.log()\n .level(constants.LOG_ERROR)\n .message(msg)\n .payload(payload)\n .record();\n this._pushInternalLog(record);\n\n // Internal errors are reported to the host console conditionally based\n // on the verbosity level.\n let verbosity = this.verbosity();\n if (verbosity === 0) {\n return;\n }\n\n // Error messages are throttled in verbosity === 1 mode\n const now = Date.now();\n if (verbosity === 1) {\n const nextVisible = this._lastVisibleErrorMillis + this._options.error_throttle_millis;\n if (now < nextVisible) {\n this._skippedVisibleErrors++;\n return;\n }\n if (this._skippedVisibleErrors > 0) {\n /* eslint-disable max-len */\n const s = `${this._skippedVisibleErrors} errors masked since last logged error. Increase 'verbosity' option to see all errors.`;\n /* eslint-enable max-len */\n this._printToConsole('error', `[LightStep:ERROR] ${s}`, payload);\n }\n }\n\n this._printToConsole('error', `[LightStep:ERROR] ${msg}`, payload);\n this._lastVisibleErrorMillis = now;\n this._skippedVisibleErrors = 0;\n }\n\n _printToConsole(type, msg, payload) {\n // Internal option to silence intentional errors generated by the unit\n // tests.\n if (this._options.silent) {\n return;\n }\n\n if (payload !== undefined) {\n console[type](msg, payload); // eslint-disable-line no-console\n } else {\n console[type](msg); // eslint-disable-line no-console\n }\n }\n\n _pushInternalLog(record) {\n if (!record) {\n return;\n }\n if (this._internalLogs.length >= MAX_INTERNAL_LOGS) {\n record.message = `MAX_INTERNAL_LOGS limit hit. Last error: ${record.message}`;\n this._internalLogs[this._internalLogs.length - 1] = record;\n } else {\n this._internalLogs.push(record);\n }\n }\n}\n","import _each from '../../_each';\n\n// How many updates before a sample is considered old. This happens to\n// be one less than the number of samples in our buffer but that's\n// somewhat arbitrary.\nconst kMaxOffsetAge = 7;\n\nconst kStoredSamplesTTLMicros = 60 * 60 * 1000 * 1000; // 1 hour\n\nclass ClockState {\n\n constructor(opts) {\n this._nowMicros = opts.nowMicros;\n this._localStoreGet = opts.localStoreGet;\n this._localStoreSet = opts.localStoreSet;\n\n // The last eight samples, computed from timing information in\n // RPCs.\n this._samples = [];\n this._currentOffsetMicros = 0;\n\n // How many updates since we've updated currentOffsetMicros.\n this._currentOffsetAge = kMaxOffsetAge + 1;\n\n // Try to load samples from the local store.\n // Only use the data if it's recent.\n let storedData = this._localStoreGet();\n if (storedData &&\n storedData.timestamp_micros &&\n storedData.timestamp_micros > this._nowMicros() - kStoredSamplesTTLMicros) {\n // Make sure there are no more than (kMaxOffsetAge+1) elements\n this._samples = storedData.samples.slice(-(kMaxOffsetAge + 1));\n }\n // Update the current offset based on these data.\n this.update();\n }\n\n // Add a new timing sample and update the offset.\n addSample(originMicros,\n receiveMicros,\n transmitMicros,\n destinationMicros\n ) {\n let latestDelayMicros = Number.MAX_VALUE;\n let latestOffsetMicros = 0;\n // Ensure that all of the data are valid before using them. If\n // not, we'll push a {0, MAX} record into the queue.\n if (originMicros > 0 && receiveMicros > 0 &&\n transmitMicros > 0 && destinationMicros > 0) {\n latestDelayMicros = (destinationMicros - originMicros) -\n (transmitMicros - receiveMicros);\n latestOffsetMicros = ((receiveMicros - originMicros) +\n (transmitMicros - destinationMicros)) / 2;\n }\n\n // Discard the oldest sample and push the new one.\n if (this._samples.length === kMaxOffsetAge + 1) {\n this._samples.shift();\n }\n this._samples.push({\n delayMicros : latestDelayMicros,\n offsetMicros : latestOffsetMicros,\n });\n this._currentOffsetAge++;\n\n // Update the local store with this new sample.\n this._localStoreSet({\n timestamp_micros : this._nowMicros(),\n samples : this._samples,\n });\n this.update();\n }\n\n // Update the time offset based on the current samples.\n update() {\n // This is simplified version of the clock filtering in Simple\n // NTP. It ignores precision and dispersion (frequency error). In\n // brief, it keeps the 8 (kMaxOffsetAge+1) most recent\n // delay-offset pairs, and considers the offset with the smallest\n // delay to be the best one. However, it only uses this new offset\n // if the change (relative to the last offset) is small compared\n // to the estimated error.\n //\n // See:\n // https://tools.ietf.org/html/rfc5905#appendix-A.5.2\n // http://books.google.com/books?id=pdTcJBfnbq8C\n // esp. section 3.5\n // http://www.eecis.udel.edu/~mills/ntp/html/filter.html\n // http://www.eecis.udel.edu/~mills/database/brief/algor/algor.pdf\n // http://www.eecis.udel.edu/~mills/ntp/html/stats.html\n\n // TODO: Consider huff-n'-puff if the delays are highly asymmetric.\n // http://www.eecis.udel.edu/~mills/ntp/html/huffpuff.html\n\n // Find the sample with the smallest delay; the corresponding\n // offset is the \"best\" one.\n let minDelayMicros = Number.MAX_VALUE;\n let bestOffsetMicros = 0;\n _each(this._samples, (sample) => {\n if (sample.delayMicros < minDelayMicros) {\n minDelayMicros = sample.delayMicros;\n bestOffsetMicros = sample.offsetMicros;\n }\n });\n\n // No update.\n if (bestOffsetMicros === this._currentOffsetMicros) {\n return;\n }\n\n // Now compute the jitter, i.e. the error relative to the new\n // offset were we to use it.\n let jitter = 0;\n _each(this._samples, (sample) => {\n jitter += Math.pow(bestOffsetMicros - sample.offsetMicros, 2);\n });\n jitter = Math.sqrt(jitter / this._samples.length);\n\n // Ignore spikes: only use the new offset if the change is not too\n // large... unless the current offset is too old. The \"too old\"\n // condition is also triggered when update() is called from the\n // constructor.\n const kSGATE = 3; // See RFC 5905\n if (this._currentOffsetAge > kMaxOffsetAge ||\n Math.abs(this._currentOffsetMicros - bestOffsetMicros) < kSGATE * jitter) {\n this._currentOffsetMicros = bestOffsetMicros;\n this._currentOffsetAge = 0;\n }\n }\n\n // Returns the difference in microseconds between the server's clock\n // and our clock. This should be added to any local timestamps before\n // sending them to the server. Note that a negative offset means that\n // the local clock is ahead of the server's.\n offsetMicros() {\n return Math.floor(this._currentOffsetMicros);\n }\n\n // Returns true if we've performed enough measurements to be confident\n // in the current offset.\n isReady() {\n return this._samples.length > 3;\n }\n\n activeSampleCount() {\n return this._samples.length;\n }\n}\n\nmodule.exports = ClockState;\n","class Util {\n\n // Similar to a regular setTimeout() call, but dereferences the timer so the\n // program execution will not be held up by this timer.\n detachedTimeout(callback, delay) {\n let timer = setTimeout(callback, delay);\n if (timer.unref) {\n timer.unref();\n }\n return timer;\n }\n}\n\nexport default new Util();\n","import Tracer from './imp/tracer_imp';\nimport { Platform } from './platform_abstraction_layer';\n\nconst library = {\n Tracer : Tracer,\n};\n\nPlatform.initLibrary(library);\nmodule.exports = library;\n","/* global PLATFORM_BROWSER */\n\n// Hide the differences in how the Thrift compiler generates code for the\n// different platforms as well as expose a Platform class to abstract a few\n// general differences in the platforms.\nif ((typeof PLATFORM_BROWSER !== 'undefined') && PLATFORM_BROWSER) {\n module.exports = {\n Platform : require('./imp/platform/browser/platform_browser.js'),\n ThriftTransport : require('./imp/platform/browser/transport_httpthrift.js'),\n ProtoTransport : require('./imp/platform/browser/transport_httpproto.js'),\n thrift : require('./imp/platform/browser/thrift.js'),\n crouton_thrift : require('./imp/platform/browser/crouton_thrift.js'),\n proto : require('./imp/generated_proto/collector_pb.js'),\n };\n} else {\n module.exports = {\n Platform : require('./imp/platform/node/platform_node.js'),\n ThriftTransport : require('./imp/platform/node/transport_httpthrift.js'),\n ProtoTransport : require('./imp/platform/node/transport_httpproto.js'),\n thrift : require('thrift'),\n crouton_thrift : require('./imp/platform/node/crouton_thrift.js'),\n proto : require('./imp/generated_proto/collector_pb.js'),\n };\n}\n","import _each from '../_each';\n\nclass InstrumentPageLoad {\n constructor() {\n this._inited = false;\n this._span = null;\n }\n\n name() {\n return 'instrument_page_load';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('instrument_page_load', { type : 'bool', defaultValue : false });\n }\n\n start(tracerImp) {\n if (this._inited) {\n return;\n }\n this._inited = true;\n\n if (typeof window !== 'object' || typeof document !== 'object') {\n return;\n }\n\n const currentOptions = tracerImp.options();\n if (currentOptions.instrument_page_load) {\n this._ensureSpanStarted(tracerImp);\n document.addEventListener('readystatechange', this._handleReadyStateChange.bind(this));\n }\n }\n\n stop() {\n }\n\n _ensureSpanStarted(tracerImp) {\n if (!this._span) {\n this._span = tracerImp.startSpan('document/load');\n tracerImp.addActiveRootSpan(this._span);\n }\n }\n\n _handleReadyStateChange() {\n if (!this._span) {\n return;\n }\n\n let span = this._span;\n let state = document.readyState;\n let payload = undefined;\n if (state === 'complete') {\n payload = {};\n if (window.performance && performance.timing) {\n this._addTimingSpans(span, performance.timing);\n payload['window.performance.timing'] = performance.timing;\n }\n }\n\n span.logEvent(`document.readystatechange ${state}`, payload);\n\n if (state === 'complete') {\n if (span.tracer()) {\n span.tracer().removeActiveRootSpan(span.tracer());\n }\n span.finish();\n }\n }\n\n _copyNavigatorProperties(nav) {\n let dst = {};\n for (let key in nav) { // eslint-disable-line guard-for-in\n try {\n let value = nav[key];\n switch (key) {\n\n case 'plugins': {\n let p = [];\n for (let i = 0; i < value.length; i++) {\n let item = value.item(i);\n p.push({\n name : item.name,\n description : item.description,\n });\n }\n dst[key] = p;\n } break;\n\n case 'mimeTypes': {\n let p = [];\n for (let i = 0; i < value.length; i++) {\n let item = value.item(i);\n p.push({\n type : item.type,\n description : item.description,\n suffixes : item.suffixes,\n });\n }\n dst[key] = p;\n } break;\n\n default:\n dst[key] = value;\n break;\n }\n } catch (e) {\n // Skip, just in case\n }\n }\n return dst;\n }\n\n // Retroactively create the appropriate spans and logs\n _addTimingSpans(parentImp, timing) {\n // NOTE: this currently relies on LightStep-specific APIs\n if (!parentImp) {\n return;\n }\n\n parentImp.setTag('user_agent', navigator.userAgent);\n\n _each(timing, (value, key) => {\n // e.g. secureConnectionStart is not always set\n if (typeof value !== 'number' || value === 0) {\n return;\n }\n\n let payload = undefined;\n\n if (key === 'navigationStart' && typeof navigator === 'object') {\n payload = {\n navigator : this._copyNavigatorProperties(navigator),\n };\n }\n parentImp.log({\n message : `document ${key}`,\n payload : payload,\n }, value);\n });\n\n if (window.chrome && window.chrome.loadTimes) {\n let chromeTimes = window.chrome.loadTimes();\n if (chromeTimes) {\n parentImp.log({\n message : 'window.chrome.loadTimes()',\n payload : chromeTimes,\n }, timing.domComplete);\n }\n }\n\n parentImp.setBeginMicros(timing.navigationStart * 1000.0);\n\n parentImp.tracer().startSpan('document/time_to_first_byte', { childOf : parentImp })\n .setBeginMicros(timing.requestStart * 1000.0)\n .setEndMicros(timing.responseStart * 1000.0)\n .finish();\n parentImp.tracer()\n .startSpan('document/response_transfer', { childOf : parentImp })\n .setBeginMicros(timing.responseStart * 1000.0)\n .setEndMicros(timing.responseEnd * 1000.0)\n .finish();\n parentImp.tracer().startSpan('document/dom_load', { childOf : parentImp })\n .setBeginMicros(timing.domLoading * 1000.0)\n .setEndMicros(timing.domInteractive * 1000.0)\n .finish();\n }\n}\n\nmodule.exports = new InstrumentPageLoad();\n","import _each from '../_each';\nimport * as opentracing from 'opentracing';\n\n// Capture the proxied values on script load (i.e. ASAP) in case there are\n// multiple layers of instrumentation.\nlet proxied = {};\nif (typeof window === 'object' && typeof window.XMLHttpRequest !== 'undefined') {\n proxied = {\n XMLHttpRequest : XMLHttpRequest,\n open : XMLHttpRequest.prototype.open,\n send : XMLHttpRequest.prototype.send,\n setRequestHeader : XMLHttpRequest.prototype.setRequestHeader,\n };\n}\n\nfunction getCookies() {\n if (typeof document === 'undefined' || !document.cookie) {\n return null;\n }\n let cookies = document.cookie.split(';');\n let data = {};\n let count = 0;\n for (let i = 0; i < cookies.length; i++) {\n let parts = cookies[i].split('=', 2);\n if (parts.length === 2) {\n let key = parts[0].replace(/^\\s+/, '').replace(/\\s+$/, '');\n data[key] = decodeURIComponent(parts[1]);\n try {\n data[key] = JSON.parse(data[key]);\n } catch (_ignored) { /* Ignored */ }\n count++;\n }\n }\n if (count > 0) {\n return data;\n }\n return null;\n}\n\n// Normalize the getAllResponseHeaders output\nfunction getResponseHeaders(xhr) {\n let raw = xhr.getAllResponseHeaders();\n let parts = raw.replace(/\\s+$/, '').split(/\\n/);\n for (let i = 0; i < parts.length; i++) {\n parts[i] = parts[i].replace(/\\r/g, '').replace(/^\\s+/, '').replace(/\\s+$/, '');\n }\n return parts;\n}\n\n// Automatically create spans for all XMLHttpRequest objects.\n//\n// NOTE: this code currently works only with a single Tracer.\n//\nclass InstrumentXHR {\n constructor() {\n this._enabled = this._isValidContext();\n this._proxyInited = false;\n this._internalExclusions = [];\n this._tracer = null;\n this._handleOptions = this._handleOptions.bind(this);\n\n if (!this._enabled) {\n return;\n }\n }\n\n name() {\n return 'instrument_xhr';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('xhr_instrumentation', { type : 'bool', defaultValue : false });\n tracerImp.addOption('xhr_url_inclusion_patterns', { type : 'array', defaultValue : [/.*/] });\n tracerImp.addOption('xhr_url_exclusion_patterns', { type : 'array', defaultValue : [] });\n }\n\n start(tracerImp) {\n if (!this._enabled) {\n return;\n }\n this._tracer = tracerImp;\n\n let currentOptions = tracerImp.options();\n this._addServiceHostToExclusions(currentOptions);\n this._handleOptions({}, currentOptions);\n tracerImp.on('options', this._handleOptions);\n }\n\n stop() {\n if (!this._enabled) {\n return;\n }\n let proto = proxied.XMLHttpRequest.prototype;\n proto.open = proxied.open;\n proto.send = proxied.send;\n }\n\n /**\n * Respond to options changes on the Tracer.\n *\n * Note that `modified` is the options that have changed in this call,\n * along with their previous and new values. `current` is the full set of\n * current options *including* the newly modified values.\n */\n _handleOptions(modified, current) {\n // Automatically add the service host itself to the list of exclusions\n // to avoid reporting on the reports themselves\n let serviceHost = modified.collector_host;\n if (serviceHost) {\n this._addServiceHostToExclusions(current);\n }\n\n // Set up the proxied XHR calls unless disabled\n if (!this._proxyInited && current.xhr_instrumentation) {\n this._proxyInited = true;\n let proto = proxied.XMLHttpRequest.prototype;\n proto.setRequestHeader = this._instrumentSetRequestHeader();\n proto.open = this._instrumentOpen();\n proto.send = this._instrumentSend();\n }\n }\n\n /**\n * Ensure that the reports to the collector don't get instrumented as well,\n * as that recursive instrumentation is more confusing than valuable!\n */\n _addServiceHostToExclusions(opts) {\n if (opts.collector_host.length === 0) {\n return;\n }\n\n // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\n function escapeRegExp(str) {\n return (`${str}`).replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n }\n\n // Check against the hostname without the port as well as the canonicalized\n // URL may drop the standard port.\n let host = escapeRegExp(opts.collector_host);\n let port = escapeRegExp(opts.collector_port);\n let set = [new RegExp(`^https?://${host}:${port}`)];\n if (port === '80') {\n set.push(new RegExp(`^http://${host}`));\n } else if (port === '443') {\n set.push(new RegExp(`^https://${host}`));\n }\n this._internalExclusions = set;\n }\n\n /**\n * Check preconditions for the auto-instrumentation of XHRs to work properly.\n * There are a lot of potential JavaScript platforms.\n */\n _isValidContext() {\n if (typeof window === 'undefined') {\n return false;\n }\n if (!window.XMLHttpRequest) {\n return false;\n }\n if (!window.XMLHttpRequest.prototype) {\n return false;\n }\n return true;\n }\n\n _instrumentSetRequestHeader() {\n return function (header, value) {\n this.__requestHeaders = this.__requestHeaders || {};\n this.__requestHeaders[header] = value;\n return proxied.setRequestHeader.apply(this, arguments);\n };\n }\n\n _instrumentOpen() {\n let self = this;\n let tracer = this._tracer;\n\n return function (method, url, asyncArg, user, password) {\n if (!self._shouldTrace(tracer, this, url)) {\n return proxied.open.apply(this, arguments);\n }\n\n let span = tracer.startSpan('XMLHttpRequest');\n tracer.addActiveRootSpan(span);\n this.__tracer_span = span;\n this.__tracer_url = url;\n\n let tags = {\n method : method,\n url : url,\n async : asyncArg,\n user : user,\n };\n if (url) {\n tags.url_pathname = url.split('?')[0];\n }\n\n let openPayload = {};\n _each(tags, (val, key) => {\n openPayload[key] = val;\n });\n openPayload.cookies = getCookies();\n\n // Note: async defaults to true\n let async = (asyncArg === undefined ? true : asyncArg);\n if (async) {\n this.addEventListener('readystatechange', function () {\n if (this.readyState === 0) {\n span.log({\n readyState : 0,\n event : 'unsent',\n });\n } else if (this.readyState === 1) {\n span.log({\n readyState : 1,\n event : 'sending',\n });\n } else if (this.readyState === 2) {\n span.log({\n readyState : 2,\n event : 'headers received',\n method : method,\n url : url,\n openPayload : openPayload,\n headers : getResponseHeaders(this),\n });\n span.addTags(tags);\n } else if (this.readyState === 3) {\n span.log({\n readyState : 3,\n event : 'loading',\n });\n } else if (this.readyState === 4) {\n let responseType = this.responseType;\n span.log({\n readyState : 4,\n url : url,\n method : method,\n headers : getResponseHeaders(this),\n status : this.status,\n statusText : this.statusText,\n responseType : responseType,\n });\n tracer.removeActiveRootSpan(span);\n span.finish();\n } else {\n span.log({\n readyState : this.readyState,\n });\n }\n });\n }\n\n let result = proxied.open.apply(this, arguments);\n if (!async) {\n tracer.removeActiveRootSpan(span);\n span.finish();\n }\n return result;\n };\n }\n\n _instrumentSend() {\n let self = this;\n let tracer = this._tracer;\n return function () {\n if (!self._shouldTrace(tracer, this, this.__tracer_url)) {\n return proxied.send.apply(this, arguments);\n }\n\n let span = this.__tracer_span;\n if (!span) {\n return proxied.send.apply(this, arguments);\n }\n\n let data = Array.prototype.slice.call(arguments);\n let len = undefined;\n if (data.length === 1) {\n if (data[0] && data[0].length) {\n len = data[0].length;\n }\n try {\n data = JSON.parse(data[0]);\n } catch (e) {\n // Ignore the error\n }\n }\n let lenStr = (len === undefined) ? '' : `, data length=${len}`;\n span.log({\n event : 'send',\n data_length : lenStr,\n });\n\n // Add Open-Tracing headers\n const headersCarrier = {};\n tracer.inject(span.context(), opentracing.FORMAT_HTTP_HEADERS, headersCarrier);\n const keys = Object.keys(headersCarrier);\n keys.forEach((key) => {\n proxied.setRequestHeader.call(this, key, headersCarrier[key]);\n });\n\n return proxied.send.apply(this, arguments);\n };\n }\n\n _shouldTrace(tracer, xhr, url) {\n // This shouldn't be possible, but let's be paranoid\n if (!tracer) {\n return false;\n }\n\n let opts = tracer.options();\n if (opts.disabled) {\n return false;\n }\n if (!url) {\n return false;\n }\n for (let key in this._internalExclusions) {\n if (!this._internalExclusions.hasOwnProperty(key)) {\n continue;\n }\n const ex = this._internalExclusions[key];\n if (ex.test(url)) {\n return false;\n }\n }\n let include = false;\n for (let key in opts.xhr_url_inclusion_patterns) {\n if (!opts.xhr_url_inclusion_patterns.hasOwnProperty(key)) {\n continue;\n }\n const inc = opts.xhr_url_inclusion_patterns[key];\n if (inc.test(url)) {\n include = true;\n break;\n }\n }\n if (!include) {\n return false;\n }\n for (let key in opts.xhr_url_exclusion_patterns) {\n if (!opts.xhr_url_exclusion_patterns.hasOwnProperty(key)) {\n continue;\n }\n const ex = opts.xhr_url_exclusion_patterns[key];\n if (ex.test(url)) {\n return false;\n }\n }\n return true;\n }\n}\n\nmodule.exports = new InstrumentXHR();\n","const constants = require('../constants');\n\nclass LogToConsole {\n constructor() {\n this._enabled = false;\n this._tracer = null;\n this._optionsCb = this._handleOptions.bind(this);\n this._logAddedCb = this._handleLogAdded.bind(this);\n }\n\n name() {\n return 'log_to_console';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('log_to_console', {\n type : 'bool',\n defaultValue : false,\n });\n tracerImp.on('options', this._optionsCb);\n }\n\n start(tracer, tracerImp) {\n this._tracer = tracer;\n }\n\n stop() {\n this._tracer.removeListener('options', this._optionsCb);\n }\n\n _handleOptions(modified, current, tracerImp) {\n let enabled = current.log_to_console;\n if (this._enabled === enabled) {\n return;\n }\n this._enabled = enabled;\n if (this._enabled) {\n tracerImp.on('log_added', this._logAddedCb);\n } else {\n tracerImp.removeListener('log_added', this._logAddedCb);\n }\n }\n\n _handleLogAdded(record) {\n let level = constants.LOG_STRING_TO_LEVEL[record.level];\n let message = record.message;\n\n // Ignore records without a message (e.g. a stable_name log record)\n if (!message) {\n return;\n }\n\n let payload = record.payload_json;\n if (payload) {\n try {\n payload = JSON.parse(payload);\n } catch (_ignored) { /* ignored */ }\n }\n\n switch (level) {\n case constants.LOG_ERROR:\n case constants.LOG_FATAL:\n if (payload !== undefined) {\n console.error(message, payload); // eslint-disable-line no-console\n } else {\n console.error(message); // eslint-disable-line no-console\n }\n break;\n case constants.LOG_WARN:\n if (payload !== undefined) {\n console.warn(message, payload); // eslint-disable-line no-console\n } else {\n console.warn(message); // eslint-disable-line no-console\n }\n break;\n case constants.LOG_INFO:\n default:\n if (payload !== undefined) {\n console.log(message, payload); // eslint-disable-line no-console\n } else {\n console.log(message); // eslint-disable-line no-console\n }\n break;\n }\n }\n}\n\nmodule.exports = new LogToConsole();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://lightstep/webpack/universalModuleDefinition","webpack://lightstep/webpack/bootstrap","webpack://lightstep/./node_modules/@protobufjs/aspromise/index.js","webpack://lightstep/./node_modules/@protobufjs/base64/index.js","webpack://lightstep/./node_modules/@protobufjs/eventemitter/index.js","webpack://lightstep/./node_modules/@protobufjs/float/index.js","webpack://lightstep/./node_modules/@protobufjs/inquire/index.js","webpack://lightstep/./node_modules/@protobufjs/pool/index.js","webpack://lightstep/./node_modules/@protobufjs/utf8/index.js","webpack://lightstep/./node_modules/eventemitter3/index.js","webpack://lightstep/./node_modules/hex2dec/index.js","webpack://lightstep/./node_modules/opentracing/lib/binary_carrier.js","webpack://lightstep/./node_modules/opentracing/lib/constants.js","webpack://lightstep/./node_modules/opentracing/lib/ext/tags.js","webpack://lightstep/./node_modules/opentracing/lib/functions.js","webpack://lightstep/./node_modules/opentracing/lib/global_tracer.js","webpack://lightstep/./node_modules/opentracing/lib/index.js","webpack://lightstep/./node_modules/opentracing/lib/mock_tracer/index.js","webpack://lightstep/./node_modules/opentracing/lib/mock_tracer/mock_context.js","webpack://lightstep/./node_modules/opentracing/lib/mock_tracer/mock_report.js","webpack://lightstep/./node_modules/opentracing/lib/mock_tracer/mock_span.js","webpack://lightstep/./node_modules/opentracing/lib/mock_tracer/mock_tracer.js","webpack://lightstep/./node_modules/opentracing/lib/noop.js","webpack://lightstep/./node_modules/opentracing/lib/reference.js","webpack://lightstep/./node_modules/opentracing/lib/span.js","webpack://lightstep/./node_modules/opentracing/lib/span_context.js","webpack://lightstep/./node_modules/opentracing/lib/tracer.js","webpack://lightstep/./node_modules/protobufjs/minimal.js","webpack://lightstep/./node_modules/protobufjs/src/index-minimal.js","webpack://lightstep/./node_modules/protobufjs/src/reader.js","webpack://lightstep/./node_modules/protobufjs/src/reader_buffer.js","webpack://lightstep/./node_modules/protobufjs/src/roots.js","webpack://lightstep/./node_modules/protobufjs/src/rpc.js","webpack://lightstep/./node_modules/protobufjs/src/rpc/service.js","webpack://lightstep/./node_modules/protobufjs/src/util/longbits.js","webpack://lightstep/./node_modules/protobufjs/src/util/minimal.js","webpack://lightstep/./node_modules/protobufjs/src/writer.js","webpack://lightstep/./node_modules/protobufjs/src/writer_buffer.js","webpack://lightstep/(webpack)/buildin/global.js","webpack://lightstep/./src/_each.js","webpack://lightstep/./src/constants.js","webpack://lightstep/./src/imp/auth_imp.js","webpack://lightstep/./src/imp/coerce.js","webpack://lightstep/./src/imp/generated_proto.js","webpack://lightstep/./src/imp/globals.js","webpack://lightstep/./src/imp/log_builder.js","webpack://lightstep/./src/imp/log_record_imp.js","webpack://lightstep/./src/imp/platform/browser/crouton_thrift.js","webpack://lightstep/./src/imp/platform/browser/generated/thrift_all.js","webpack://lightstep/./src/imp/platform/browser/options_parser.js","webpack://lightstep/./src/imp/platform/browser/platform_browser.js","webpack://lightstep/./src/imp/platform/browser/thrift.js","webpack://lightstep/./src/imp/platform/browser/transport_httpproto.js","webpack://lightstep/./src/imp/platform/browser/transport_httpthrift.js","webpack://lightstep/./src/imp/platform/browser/util.js","webpack://lightstep/./src/imp/report_imp.js","webpack://lightstep/./src/imp/runtime_imp.js","webpack://lightstep/./src/imp/span_context_imp.js","webpack://lightstep/./src/imp/span_imp.js","webpack://lightstep/./src/imp/tracer_imp.js","webpack://lightstep/./src/imp/util/clock_state.js","webpack://lightstep/./src/imp/util/util.js","webpack://lightstep/./src/lib.js","webpack://lightstep/./src/platform_abstraction_layer.js","webpack://lightstep/./src/plugins/instrument_document_load.js","webpack://lightstep/./src/plugins/instrument_xhr.js","webpack://lightstep/./src/plugins/log_to_console.js"],"names":["_each","obj","cb","key","hasOwnProperty","call","LOG_INFO","LOG_WARN","LOG_ERROR","LOG_FATAL","LOG_LEVEL_TO_STRING","LOG_STRING_TO_LEVEL","I","W","E","F","CLOCK_STATE_REFRESH_INTERVAL_MS","LIGHTSTEP_APP_URL_PREFIX","JOIN_ID_PREFIX","proto","collector","AuthImp","accessToken","_accessToken","Auth","access_token","authProto","toString","toNumber","toBoolean","value","Number","$protobuf","$Reader","Reader","$Writer","Writer","$util","util","$root","roots","lightstep","SpanContext","properties","baggage","keys","Object","i","length","prototype","traceId","Long","fromBits","spanId","emptyObject","create","encode","message","writer","uint32","uint64","fork","string","ldelim","encodeDelimited","decode","reader","end","undefined","len","pos","tag","skip","skipType","decodeDelimited","verify","isInteger","low","high","isObject","isString","fromObject","object","fromValue","unsigned","parseInt","LongBits","TypeError","String","toObject","options","objects","defaults","long","longs","keys2","j","toJSON","constructor","toJSONOptions","KeyValue","stringValue","intValue","doubleValue","boolValue","jsonValue","$oneOfFields","defineProperty","get","oneOfGetter","set","oneOfSetter","int64","double","bool","Boolean","oneofs","json","isFinite","Log","fields","timestamp","emptyArray","google","protobuf","Timestamp","push","error","Array","isArray","arrays","Reference","relationship","spanContext","int32","enums","Relationship","valuesById","values","Span","references","tags","logs","operationName","startTimestamp","durationMicros","Reporter","reporterId","MetricsSample","name","InternalMetrics","counts","gauges","ReportRequest","spans","reporter","auth","timestampOffsetMicros","internalMetrics","Command","disable","ReportResponse","commands","errors","warnings","infos","receiveTimestamp","transmitTimestamp","CollectorService","rpcImpl","requestDelimited","responseDelimited","rpc","Service","report","request","callback","rpcCall","seconds","nanos","FileDescriptorSet","file","FileDescriptorProto","dependency","publicDependency","weakDependency","messageType","enumType","service","extension","sourceCodeInfo","syntax","DescriptorProto","EnumDescriptorProto","ServiceDescriptorProto","FieldDescriptorProto","FileOptions","SourceCodeInfo","end2","field","nestedType","extensionRange","oneofDecl","reservedRange","reservedName","ExtensionRange","MessageOptions","OneofDescriptorProto","ReservedRange","start","number","label","type","typeName","extendee","defaultValue","oneofIndex","jsonName","FieldOptions","Label","Type","OneofOptions","EnumValueDescriptorProto","EnumOptions","EnumValueOptions","method","MethodDescriptorProto","ServiceOptions","inputType","outputType","clientStreaming","serverStreaming","MethodOptions","uninterpretedOption","javaPackage","javaOuterClassname","javaMultipleFiles","javaGenerateEqualsAndHash","javaStringCheckUtf8","optimizeFor","goPackage","ccGenericServices","javaGenericServices","pyGenericServices","deprecated","ccEnableArenas","objcClassPrefix","csharpNamespace","UninterpretedOption","OptimizeMode","messageSetWireFormat","noStandardDescriptorAccessor","mapEntry","ctype","packed","jstype","lazy","weak","CType","JSType","allowAlias","api","HttpRule","identifierValue","positiveIntValue","negativeIntValue","newBuffer","aggregateValue","NamePart","bytes","base64","slice","namePart","isExtension","ProtocolError","instance","location","Location","path","span","leadingDetachedComments","leadingComments","trailingComments","GeneratedCodeInfo","annotation","Annotation","sourceFile","begin","Http","rules","additionalBindings","put","post","patch","custom","selector","body","CustomHttpPattern","pattern","kind","default","PackageGlobals","opts","val","module","exports","constants","require","coerce","LogBuilder","runtime","_runtime","_record","LogRecord","timestamp_micros","_platform","nowMicros","runtime_guid","span_guid","stable_name","level","thread_id","filename","line_number","stack_frames","payload_json","error_flag","_addLogRecord","micros","msg","num","guid","stableName","flag","data","_encodePayload","payloadJSON","JSON","stringify","_ignored","googleProtobufTimestampPB","LogRecordImp","logFieldKeyHardLimit","logFieldValueHardLimit","timestampMicros","_logFieldKeyHardLimit","_logFieldValueHardLimit","_timestampMicros","_fields","_keysOverLimit","_valuesOverLimit","_clearOverLimits","thriftFields","keyStr","getFieldKey","valStr","getFieldValue","Key","Value","substr","e","log","ts","millis","Math","floor","secs","keyValues","keyValue","crouton_thrift","Thrift","args","TProtocolException","TProtocolExceptionType","UNKNOWN","read","write","NamedCounter","Name","Runtime","start_micros","group_name","attrs","TraceJoinId","TraceKey","SpanRecord","trace_guid","span_name","join_ids","oldest_micros","youngest_micros","attributes","log_records","Timing","receive_micros","transmit_micros","SampleCount","count","int64_value","double_value","Metrics","span_records","timestamp_offset_micros","counters","internal_logs","internal_metrics","timing","hostScriptElement","WorkerGlobalScope","self","scripts","document","getElementsByTagName","urlQueryParameters","vars","qi","window","href","indexOf","hashes","replace","split","hash","decodeURIComponent","parseScriptElementOptions","browserOpts","dataset","componentName","component_name","collectorHost","collector_host","collectorPort","collector_port","collectorPath","collector_path","collectorEncryption","collector_encryption","enable","verbosity","init","init_global_tracer","xhr_instrumentation","instrument_page_load","parseURLQueryOptions","params","lightstep_verbosity","lightstep_log_to_console","log_to_console","optionsParser","kRuntimeGUIDCookiePrefix","kSessionIDCookieKey","kCookieTimeToLiveSeconds","nowMicrosImp","performance","now","navigationStart","Date","PlatformBrowser","groupName","cookieKey","uuid","cookie","_generateLongUUID","sessionID","p0","abs","random","p1","addEventListener","imp","tracerOpts","Error","sessionStorage","parse","getItem","setItem","lib","initGlobalTracer","opentracing","Tracer","TransportBrowser","_host","_port","_path","_encryption","detached","done","_reportAJAX","reportProto","toProto","protocol","url","xhr","XMLHttpRequest","responseType","open","setRequestHeader","onreadystatechange","readyState","err","resp","jsonResp","status","response","Uint8Array","exception","serialized","finish","send","_reportAsyncScript","payload","toThrift","getAccessToken","responseText","authJSON","reportJSON","encodeURIComponent","elem","createElement","async","defer","src","hostElem","appendChild","ttl","domain","secure","arguments","newCookie","toUTCString","ReportImp","oldestMicros","youngestMicros","spanRecords","internalLogs","_oldestMicros","_youngestMicros","_spanRecords","_internalLogs","_counters","_timestampOffsetMicros","_runtimeGUID","thriftCounters","thriftSpanRecords","spanRecord","_toThrift","spansList","_toProto","countsList","metricSample","converter","packageObject","RuntimeImp","runtimeGUID","startMicros","_startMicros","_componentName","_attributes","thriftAttrs","tracerVersion","version","tracerPlatform","hexToDec","reporterProto","SpanContextImp","_baggage","f","spanGUID","traceGUID","_guid","_traceGUID","SpanImp","_tracerImp","_ctx","_operationName","keyValuePairs","_tags","argumentType","_error","tsMicros","record","getLogFieldKeyHardLimit","getLogFieldValueHardLimit","_log_records","emit","finishTime","tracer","console","assert","_ended","_beginMicros","_endMicros","_errorFlag","parent_span_guid","urlPrefix","_addSpanRecord","logRecord","logThrift","getNumKeysOverLimit","getNumValuesOverLimit","spanContextProto","spanProto","startMillis","startSeconds","startNanos","logProto","parentSpanGUID","strValue","strKey","ref","CHILD_OF","parentSpanContext","ClockState","globals","CARRIER_TRACER_STATE_PREFIX","CARRIER_BAGGAGE_PREFIX","DEFAULT_COLLECTOR_HOSTNAME","DEFAULT_COLLECTOR_PORT_TLS","DEFAULT_COLLECTOR_PORT_PLAIN","DEFAULT_COLLECTOR_PATH","MAX_INTERNAL_LOGS","_singleton","_delegateEventEmitterMethods","setOptions","override_runtime_guid","_plugins","_options","_optionDescs","_makeOptionsTable","_opentracing","opentracing_module","_auth","logger","warn","_warn","_transport","override_transport","transport","_reportingLoopActive","_reportYoungestMicros","_reportTimer","_reportErrorStreak","_lastVisibleErrorMillis","_skippedVisibleErrors","_activeRootSpanSet","_activeRootSpan","_flushIsActive","addPlugin","addPlatformPlugins","setPlatformOptions","_useClockState","disable_clock_skew_correction","_clockState","localStoreGet","localStoreSet","_setupReportOnExit","_info","startPlugins","_ee","methodName","apply","addOption","min","max","parentCtxImp","REFERENCE_CHILD_OF","REFERENCE_FOLLOWS_FROM","context","referencedContext","generateTraceGUIDForRootSpan","spanImp","generateUUID","addTags","default_span_tags","setBeginMicros","setParentGUID","format","carrier","FORMAT_HTTP_HEADERS","FORMAT_TEXT_MAP","_injectToTextMap","FORMAT_BINARY","forEachBaggageItem","_extractTextMap","foundFields","toLowerCase","suffix","setBaggageItem","disabled","_flushReport","v","userOptions","desc","modified","unchanged","_setOptionInternal","_initReportingDataIfNeeded","_startReportingLoop","optionsString","newValue","_debug","valueType","oldValue","platformTags","tracerTags","log_field_key_hard_limit","log_field_value_hard_limit","pluginSet","plugins","plugin","addOptions","_setActiveRootSpanToYoungest","jsonString","buffer","ArrayBuffer","view","code","charCodeAt","arr","fromCharCode","b","unused","countersAllZero","_internalAddSpanRecord","max_span_records","index","currentInternalLogs","toAdd","concat","_pushInternalLog","disable_report_on_exit","finalFlushOnce","finalFlush","unflushed_spans","buffer_youngest_micros","onBeforeExit","disable_reporting_loop","stopReportingOnce","stopReporting","_stopReportingLoop","loop","_enqueueNextReport","delay","delay_initial_report_millis","detachedTimeout","clearTimeout","reportInterval","max_reporting_interval_millis","isReady","backOff","basis","jitter","manual","clockReady","clockOffsetMicros","offsetMicros","offset_micros","active_samples","activeSampleCount","ready","_buffersAreEmpty","_clearBuffers","ensureConnection","timestampOffset","originMicros","res","destinationMicros","reportWindowSeconds","errString","last_report_seconds_ago","_restoreRecords","getSpanRecords","getInternalLogs","getCounters","streak","spans_reported","addSample","_printToConsole","nextVisible","error_throttle_millis","s","silent","kMaxOffsetAge","kStoredSamplesTTLMicros","_nowMicros","_localStoreGet","_localStoreSet","_samples","_currentOffsetMicros","_currentOffsetAge","storedData","samples","update","receiveMicros","transmitMicros","latestDelayMicros","MAX_VALUE","latestOffsetMicros","shift","delayMicros","minDelayMicros","bestOffsetMicros","sample","pow","sqrt","kSGATE","Util","timer","setTimeout","unref","library","initLibrary","Platform","ThriftTransport","ProtoTransport","thrift","InstrumentPageLoad","_inited","_span","tracerImp","currentOptions","_ensureSpanStarted","_handleReadyStateChange","bind","startSpan","addActiveRootSpan","state","_addTimingSpans","logEvent","removeActiveRootSpan","nav","dst","p","item","description","suffixes","parentImp","setTag","navigator","userAgent","_copyNavigatorProperties","chrome","loadTimes","chromeTimes","domComplete","childOf","requestStart","setEndMicros","responseStart","responseEnd","domLoading","domInteractive","proxied","getCookies","cookies","parts","getResponseHeaders","raw","getAllResponseHeaders","InstrumentXHR","_enabled","_isValidContext","_proxyInited","_internalExclusions","_tracer","_handleOptions","_addServiceHostToExclusions","on","current","serviceHost","_instrumentSetRequestHeader","_instrumentOpen","_instrumentSend","escapeRegExp","str","host","port","RegExp","header","__requestHeaders","asyncArg","user","password","_shouldTrace","__tracer_span","__tracer_url","url_pathname","openPayload","event","headers","statusText","result","lenStr","data_length","headersCarrier","inject","forEach","ex","test","include","xhr_url_inclusion_patterns","inc","xhr_url_exclusion_patterns","LogToConsole","_optionsCb","_logAddedCb","_handleLogAdded","removeListener","enabled"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFa;AACb;;AAEA;AACA,wBAAwB,qBAAqB;AAC7C;AACA,UAAU;AACV,WAAW,WAAW;AACtB,WAAW,KAAK;AAChB,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,EAAE;AACb,WAAW,KAAK;AAChB,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACnDa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA,UAAU;AACV,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA,8BAA8B,EAAE,mBAAmB,EAAE,iBAAiB,EAAE;AACxE;;;;;;;;;;;;;AC1Ia;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;;;;;;;;;;;;AC3Ea;;AAEb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK,IAAI;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK,IAAI;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA,aAAa;AACb;AACA,oDAAoD;AACpD;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9Ua;AACb;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,KAAK,aAAa;AAClB;AACA;;;;;;;;;;;;;AChBa;AACb;;AAEA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,UAAU;AACV,WAAW,OAAO;AAClB,aAAa,WAAW;AACxB;;AAEA;AACA,wBAAwB,gBAAgB;AACxC;AACA,UAAU;AACV,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,WAAW;AACxB,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,WAAW;AACX,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxGa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;;AAEjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;ACnGa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,0C;;;;;;;;;;;;ACfa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;AC9Da;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;;AC3Ga;AACb,8CAA8C,cAAc;AAC5D,gBAAgB,mBAAO,CAAC,gEAAa;AACrC,kBAAkB,mBAAO,CAAC,gEAAa;AACvC,aAAa,mBAAO,CAAC,sDAAQ;AAC7B;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;;ACnCa;AACb;AACA;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A;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D,kBAAkB,mBAAO,CAAC,yDAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,wC;;;;;;;;;;;;ACjCa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,uC;;;;;;;;;;;;AC5Ca;AACb;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D,kBAAkB,mBAAO,CAAC,yDAAU;AACpC,qBAAqB,mBAAO,CAAC,kFAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,qC;;;;;;;;;;;;ACnGa;AACb;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,yDAAU;AACpC,oBAAoB,mBAAO,CAAC,gFAAe;AAC3C,kBAAkB,mBAAO,CAAC,4EAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,uC;;;;;;;;;;;;AC3Ea;AACb,8CAA8C,cAAc;AAC5D,aAAa,mBAAO,CAAC,sDAAQ;AAC7B,qBAAqB,mBAAO,CAAC,sEAAgB;AAC7C,eAAe,mBAAO,CAAC,0DAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;;AChBa;AACb,8CAA8C,cAAc;AAC5D,aAAa,mBAAO,CAAC,sDAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,qC;;;;;;;;;;;;AC1Ca;AACb,8CAA8C,cAAc;AAC5D,WAAW,mBAAO,CAAC,sDAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,YAAY;AACZ;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qCAAqC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,gC;;;;;;;;;;;;AC9Ma;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,wC;;;;;;;;;;;;ACnBa;AACb,8CAA8C,cAAc;AAC5D,gBAAgB,mBAAO,CAAC,gEAAa;AACrC,WAAW,mBAAO,CAAC,sDAAQ;AAC3B,aAAa,mBAAO,CAAC,sDAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,gBAAgB,KAAK;AACrB;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,oBAAoB;AACzE;AACA,gBAAgB,OAAO;AACvB,gBAAgB,IAAI;AACpB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,kC;;;;;;;;;;;;AClJA;;AAEa;AACb,iBAAiB,mBAAO,CAAC,2EAAqB;;;;;;;;;;;;;ACHjC;AACb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA,wBAAwB,mBAAO,CAAC,yDAAU;AAC1C,wBAAwB,mBAAO,CAAC,uEAAiB;AACjD,wBAAwB,mBAAO,CAAC,yDAAU;AAC1C,wBAAwB,mBAAO,CAAC,uEAAiB;;AAEjD;AACA,wBAAwB,mBAAO,CAAC,qEAAgB;AAChD,wBAAwB,mBAAO,CAAC,mDAAO;AACvC,wBAAwB,mBAAO,CAAC,uDAAS;AACzC;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACnCa;AACb;;AAEA,gBAAgB,mBAAO,CAAC,qEAAgB;;AAExC,iBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,oBAAoB,IAAI,mBAAmB,uCAAuC;AAC/F,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,2BAA2B;AAC3B;AACA,iEAAiE;AACjE,iEAAiE;AACjE,iEAAiE;AACjE,iEAAiE;AACjE,iEAAiE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA,KAAK;AACL;;;;;;;;;;;;;ACpZa;AACb;;AAEA;AACA,aAAa,mBAAO,CAAC,yDAAU;AAC/B;;AAEA,WAAW,mBAAO,CAAC,qEAAgB;;AAEnC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;;;;;;;;;;;;;AC3Ca;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,qBAAqB;AACtD;AACA,UAAU;AACV,WAAW,mCAAmC,YAAY,GAAG;AAC7D,WAAW,WAAW;AACtB,WAAW,gBAAgB;AAC3B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,mCAAmC,cAAc;AACjD;AACA,UAAU;AACV,WAAW,WAAW;AACtB,WAAW,gBAAgB;AAC3B,aAAa;AACb;;AAEA,cAAc,mBAAO,CAAC,mEAAe;;;;;;;;;;;;;ACnCxB;AACb;;AAEA,WAAW,mBAAO,CAAC,sEAAiB;;AAEpC;AACA;;AAEA;AACA,yCAAyC,sCAAsC;AAC/E;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB,WAAW,KAAK;AAChB,aAAa;AACb;;AAEA;AACA,+BAA+B,kBAAkB,gBAAgB,qBAAqB;AACtF;AACA;AACA;AACA,UAAU;AACV,WAAW,sBAAsB;AACjC,WAAW,gCAAgC;AAC3C,aAAa,uBAAuB;AACpC;;AAEA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,mCAAmC,kCAAkC;AACrE,WAAW,oCAAoC;AAC/C,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B,WAAW,sBAAsB;AACjC,WAAW,gCAAgC;AAC3C,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B,kCAAkC,EAAE;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+BAA+B,eAAe,EAAE;AAChD;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7Ia;AACb;;AAEA,WAAW,mBAAO,CAAC,sEAAiB;;AAEpC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA,4BAA4B,UAAU;AACtC,4CAA4C,aAAa;AACzD,0BAA0B,UAAU;;AAEpC;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvMA,8CAAa;AACb;;AAEA;AACA,iBAAiB,mBAAO,CAAC,4EAAuB;;AAEhD;AACA,cAAc,mBAAO,CAAC,sEAAoB;;AAE1C;AACA,oBAAoB,mBAAO,CAAC,kFAA0B;;AAEtD;AACA,aAAa,mBAAO,CAAC,oEAAmB;;AAExC;AACA,eAAe,mBAAO,CAAC,wEAAqB;;AAE5C;AACA,YAAY,mBAAO,CAAC,kEAAkB;;AAEtC;AACA,YAAY,mBAAO,CAAC,kEAAkB;;AAEtC;AACA,gBAAgB,mBAAO,CAAC,kEAAY;;AAEpC;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA,UAAU;AACV;AACA;AACA,mDAAmD,kCAAkC;;AAErF;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AAC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;AACb;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,YAAY;AACzB;AACA;;AAEA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC7Za;AACb;;AAEA,gBAAgB,mBAAO,CAAC,qEAAgB;;AAExC,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,mBAAmB;AACnB;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,oBAAoB,IAAI,mBAAmB,0CAA0C;AAClG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,WAAW;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,yBAAyB,KAAK,2BAA2B;AACrE,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;AC1ca;AACb;;AAEA;AACA,aAAa,mBAAO,CAAC,yDAAU;AAC/B;;AAEA,WAAW,mBAAO,CAAC,qEAAgB;;AAEnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;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AX,CAAV;AACH,iBAFD,CAEE,OAAO3K,QAAP,EAAiB,CAAE,aAAe;AACvC;;AAED,oBAAQnB,KAAR;AACA,qBAAKd,UAAU1S,SAAf;AACA,qBAAK0S,UAAUzS,SAAf;AACI,wBAAIqf,YAAY1b,SAAhB,EAA2B;AACvBugB,gCAAQ5c,KAAR,CAActE,OAAd,EAAuBqc,OAAvB,EADuB,CACU;AACpC,qBAFD,MAEO;AACH6E,gCAAQ5c,KAAR,CAActE,OAAd,EADG,CACqB;AAC3B;AACD;AACJ,qBAAKyP,UAAU3S,QAAf;AACI,wBAAIuf,YAAY1b,SAAhB,EAA2B;AACvBugB,gCAAQ8C,IAAR,CAAahkB,OAAb,EAAsBqc,OAAtB,EADuB,CACS;AACnC,qBAFD,MAEO;AACH6E,gCAAQ8C,IAAR,CAAahkB,OAAb,EADG,CACoB;AAC1B;AACD;AACJ,qBAAKyP,UAAU5S,QAAf;AACA;AACI,wBAAIwf,YAAY1b,SAAhB,EAA2B;AACvBugB,gCAAQlO,GAAR,CAAYhT,OAAZ,EAAqBqc,OAArB,EADuB,CACQ;AAClC,qBAFD,MAEO;AACH6E,gCAAQlO,GAAR,CAAYhT,OAAZ,EADG,CACmB;AACzB;AACD;AAvBJ;AAyBH;;;WAlFC80B,Y;;;AAqFNvlB,OAAOC,OAAP,GAAiB,IAAIslB,YAAJ,EAAjB,C","file":"lightstep-tracer.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"lightstep\"] = factory();\n\telse\n\t\troot[\"lightstep\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/lib.js\");\n","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\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 utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","'use strict';\n\n//\n// We store our EE objects in a plain object whose properties are event names.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// `~` to make sure that the built-in object properties are not overridden or\n// used as an attack vector.\n// We also assume that `Object.create(null)` is available when the event name\n// is an ES6 Symbol.\n//\nvar prefix = typeof Object.create !== 'function' ? '~' : false;\n\n/**\n * Representation of a single EventEmitter function.\n *\n * @param {Function} fn Event handler to be called.\n * @param {Mixed} context Context for function execution.\n * @param {Boolean} once Only emit once\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal EventEmitter interface that is molded against the Node.js\n * EventEmitter interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() { /* Nothing to set */ }\n\n/**\n * Holds the assigned EventEmitters by name.\n *\n * @type {Object}\n * @private\n */\nEventEmitter.prototype._events = undefined;\n\n/**\n * Return a list of assigned event listeners.\n *\n * @param {String} event The events that should be listed.\n * @param {Boolean} exists We only need to know if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event\n , available = this._events && this._events[evt];\n\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Emit an event to all registered event listeners.\n *\n * @param {String} event The name of the event.\n * @returns {Boolean} Indication if we've emitted an event.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events || !this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if ('function' === typeof listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Register a new EventListener for the given event.\n *\n * @param {String} event Name of the event.\n * @param {Functon} fn Callback function.\n * @param {Mixed} context The context of the function.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events) this._events = prefix ? {} : Object.create(null);\n if (!this._events[evt]) this._events[evt] = listener;\n else {\n if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [\n this._events[evt], listener\n ];\n }\n\n return this;\n};\n\n/**\n * Add an EventListener that's only called once.\n *\n * @param {String} event Name of the event.\n * @param {Function} fn Callback function.\n * @param {Mixed} context The context of the function.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events) this._events = prefix ? {} : Object.create(null);\n if (!this._events[evt]) this._events[evt] = listener;\n else {\n if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [\n this._events[evt], listener\n ];\n }\n\n return this;\n};\n\n/**\n * Remove event listeners.\n *\n * @param {String} event The event we want to remove.\n * @param {Function} fn The listener that we need to find.\n * @param {Mixed} context Only remove listeners matching this context.\n * @param {Boolean} once Only remove once listeners.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events || !this._events[evt]) return this;\n\n var listeners = this._events[evt]\n , events = [];\n\n if (fn) {\n if (listeners.fn) {\n if (\n listeners.fn !== fn\n || (once && !listeners.once)\n || (context && listeners.context !== context)\n ) {\n events.push(listeners);\n }\n } else {\n for (var i = 0, length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn\n || (once && !listeners[i].once)\n || (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) {\n this._events[evt] = events.length === 1 ? events[0] : events;\n } else {\n delete this._events[evt];\n }\n\n return this;\n};\n\n/**\n * Remove all listeners or only the listeners for the specified event.\n *\n * @param {String} event The event want to remove all listeners for.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n if (!this._events) return this;\n\n if (event) delete this._events[prefix ? prefix + event : event];\n else this._events = prefix ? {} : Object.create(null);\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * A function for converting hex <-> dec w/o loss of precision.\n *\n * The problem is that parseInt(\"0x12345...\") isn't precise enough to convert\n * 64-bit integers correctly.\n *\n * Internally, this uses arrays to encode decimal digits starting with the least\n * significant:\n * 8 = [8]\n * 16 = [6, 1]\n * 1024 = [4, 2, 0, 1]\n *\n * Source: http://www.danvk.org/hex2dec.html\n */\n\n// Adds two arrays for the given base (10 or 16), returning the result.\n// This turns out to be the only \"primitive\" operation we need.\nfunction add(x, y, base) {\n var z = [];\n var n = Math.max(x.length, y.length);\n var carry = 0;\n var i = 0;\n while (i < n || carry) {\n var xi = i < x.length ? x[i] : 0;\n var yi = i < y.length ? y[i] : 0;\n var zi = carry + xi + yi;\n z.push(zi % base);\n carry = Math.floor(zi / base);\n i++;\n }\n return z;\n}\n\n// Returns a*x, where x is an array of decimal digits and a is an ordinary\n// JavaScript number. base is the number base of the array x.\nfunction multiplyByNumber(num, x, base) {\n if (num < 0) return null;\n if (num == 0) return [];\n\n var result = [];\n var power = x;\n while (true) {\n if (num & 1) {\n result = add(result, power, base);\n }\n num = num >> 1;\n if (num === 0) break;\n power = add(power, power, base);\n }\n\n return result;\n}\n\nfunction parseToDigitsArray(str, base) {\n var digits = str.split('');\n var ary = [];\n for (var i = digits.length - 1; i >= 0; i--) {\n var n = parseInt(digits[i], base);\n if (isNaN(n)) return null;\n ary.push(n);\n }\n return ary;\n}\n\nfunction convertBase(str, fromBase, toBase) {\n var digits = parseToDigitsArray(str, fromBase);\n if (digits === null) return null;\n\n var outArray = [];\n var power = [1];\n for (var i = 0; i < digits.length; i++) {\n // invariant: at this point, fromBase^i = power\n if (digits[i]) {\n outArray = add(outArray, multiplyByNumber(digits[i], power, toBase), toBase);\n }\n power = multiplyByNumber(fromBase, power, toBase);\n }\n\n var out = '';\n for (var i = outArray.length - 1; i >= 0; i--) {\n out += outArray[i].toString(toBase);\n }\n return out;\n}\n\nfunction decToHex(decStr) {\n var hex = convertBase(decStr, 10, 16);\n return hex ? '0x' + hex : null;\n}\n\nfunction hexToDec(hexStr) {\n if (hexStr.substring(0, 2) === '0x') hexStr = hexStr.substring(2);\n hexStr = hexStr.toLowerCase();\n return convertBase(hexStr, 16, 10);\n}\n\nmodule.exports = {\n hexToDec: hexToDec,\n decToHex: decToHex\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Convenience class to use as a binary carrier.\n *\n * Any valid Object with a field named `buffer` may be used as a binary carrier;\n * this class is only one such type of object that can be used.\n */\nvar BinaryCarrier = /** @class */ (function () {\n function BinaryCarrier(buffer) {\n this.buffer = buffer;\n }\n return BinaryCarrier;\n}());\nexports.default = BinaryCarrier;\n//# sourceMappingURL=binary_carrier.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * The FORMAT_BINARY format represents SpanContexts in an opaque binary\n * carrier.\n *\n * Tracer.inject() will set the buffer field to an Array-like (Array,\n * ArrayBuffer, or TypedBuffer) object containing the injected binary data.\n * Any valid Object can be used as long as the buffer field of the object\n * can be set.\n *\n * Tracer.extract() will look for `carrier.buffer`, and that field is\n * expected to be an Array-like object (Array, ArrayBuffer, or\n * TypedBuffer).\n */\nexports.FORMAT_BINARY = 'binary';\n/**\n * The FORMAT_TEXT_MAP format represents SpanContexts using a\n * string->string map (backed by a Javascript Object) as a carrier.\n *\n * NOTE: Unlike FORMAT_HTTP_HEADERS, FORMAT_TEXT_MAP places no restrictions\n * on the characters used in either the keys or the values of the map\n * entries.\n *\n * The FORMAT_TEXT_MAP carrier map may contain unrelated data (e.g.,\n * arbitrary gRPC metadata); as such, the Tracer implementation should use\n * a prefix or other convention to distinguish Tracer-specific key:value\n * pairs.\n */\nexports.FORMAT_TEXT_MAP = 'text_map';\n/**\n * The FORMAT_HTTP_HEADERS format represents SpanContexts using a\n * character-restricted string->string map (backed by a Javascript Object)\n * as a carrier.\n *\n * Keys and values in the FORMAT_HTTP_HEADERS carrier must be suitable for\n * use as HTTP headers (without modification or further escaping). That is,\n * the keys have a greatly restricted character set, casing for the keys\n * may not be preserved by various intermediaries, and the values should be\n * URL-escaped.\n *\n * The FORMAT_HTTP_HEADERS carrier map may contain unrelated data (e.g.,\n * arbitrary HTTP headers); as such, the Tracer implementation should use a\n * prefix or other convention to distinguish Tracer-specific key:value\n * pairs.\n */\nexports.FORMAT_HTTP_HEADERS = 'http_headers';\n/**\n * A Span may be the \"child of\" a parent Span. In a “child of” reference,\n * the parent Span depends on the child Span in some capacity.\n *\n * See more about reference types at https://github.com/opentracing/specification\n */\nexports.REFERENCE_CHILD_OF = 'child_of';\n/**\n * Some parent Spans do not depend in any way on the result of their child\n * Spans. In these cases, we say merely that the child Span “follows from”\n * the parent Span in a causal sense.\n *\n * See more about reference types at https://github.com/opentracing/specification\n */\nexports.REFERENCE_FOLLOWS_FROM = 'follows_from';\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/** SPAN_KIND hints at relationship between spans, e.g. client/server */\nexports.SPAN_KIND = 'span.kind';\n/** Marks a span representing the client-side of an RPC or other remote call */\nexports.SPAN_KIND_RPC_CLIENT = 'client';\n/** Marks a span representing the server-side of an RPC or other remote call */\nexports.SPAN_KIND_RPC_SERVER = 'server';\n/** Marks a span representing the producing-side within a messaging system or other remote call */\nexports.SPAN_KIND_MESSAGING_PRODUCER = 'producer';\n/** Marks a span representing the consuming-side within a messaging system or other remote call */\nexports.SPAN_KIND_MESSAGING_CONSUMER = 'consumer';\n/**\n * ERROR (boolean) true if and only if the application considers the operation\n * represented by the Span to have failed\n */\nexports.ERROR = 'error';\n/**\n * COMPONENT (string) ia s low-cardinality identifier of the module, library,\n * or package that is generating a span.\n */\nexports.COMPONENT = 'component';\n/**\n * SAMPLING_PRIORITY (number) determines the priority of sampling this Span.\n * If greater than 0, a hint to the Tracer to do its best to capture the trace.\n * If 0, a hint to the trace to not-capture the trace. If absent, the Tracer\n * should use its default sampling mechanism.\n */\nexports.SAMPLING_PRIORITY = 'sampling.priority';\n// ---------------------------------------------------------------------------\n// PEER_* tags can be emitted by either client-side of server-side to describe\n// the other side/service in a peer-to-peer communications, like an RPC call.\n// ---------------------------------------------------------------------------\n/**\n * PEER_SERVICE (string) Remote service name (for some unspecified\n * definition of \"service\"). E.g., \"elasticsearch\", \"a_custom_microservice\", \"memcache\"\n */\nexports.PEER_SERVICE = 'peer.service';\n/** PEER_HOSTNAME (string) Remote hostname. E.g., \"opentracing.io\", \"internal.dns.name\" */\nexports.PEER_HOSTNAME = 'peer.hostname';\n/**\n * PEER_ADDRESS (string) Remote \"address\", suitable for use in a\n * networking client library. This may be a \"ip:port\", a bare\n * \"hostname\", a FQDN, or even a JDBC substring like \"mysql://prod-db:3306\"\n */\nexports.PEER_ADDRESS = 'peer.address';\n/**\n * PEER_HOST_IPV4 (number) Remote IPv4 address as a .-separated tuple.\n * E.g., \"127.0.0.1\"\n */\nexports.PEER_HOST_IPV4 = 'peer.ipv4';\n// PEER_HOST_IPV6 (string) Remote IPv6 address as a string of\n// colon-separated 4-char hex tuples. E.g., \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"\nexports.PEER_HOST_IPV6 = 'peer.ipv6';\n// PEER_PORT (number) Remote port. E.g., 80\nexports.PEER_PORT = 'peer.port';\n// ---------------------------------------------------------------------------\n// HTTP tags\n// ---------------------------------------------------------------------------\n/**\n * HTTP_URL (string) URL of the request being handled in this segment of the\n * trace, in standard URI format. E.g., \"https://domain.net/path/to?resource=here\"\n */\nexports.HTTP_URL = 'http.url';\n/**\n * HTTP_METHOD (string) HTTP method of the request for the associated Span. E.g.,\n * \"GET\", \"POST\"\n */\nexports.HTTP_METHOD = 'http.method';\n/**\n * HTTP_STATUS_CODE (number) HTTP response status code for the associated Span.\n * E.g., 200, 503, 404\n */\nexports.HTTP_STATUS_CODE = 'http.status_code';\n// -------------------------------------------------------------------------\n// Messaging tags\n// -------------------------------------------------------------------------\n/**\n * MESSAGE_BUS_DESTINATION (string) An address at which messages can be exchanged.\n * E.g. A Kafka record has an associated \"topic name\" that can be extracted\n * by the instrumented producer or consumer and stored using this tag.\n */\nexports.MESSAGE_BUS_DESTINATION = 'message_bus.destination';\n// --------------------------------------------------------------------------\n// Database tags\n// --------------------------------------------------------------------------\n/**\n * DB_INSTANCE (string) Database instance name. E.g., In java, if the\n * jdbc.url=\"jdbc:mysql://127.0.0.1:3306/customers\", the instance name is \"customers\".\n */\nexports.DB_INSTANCE = 'db.instance';\n/**\n * DB_STATEMENT (string) A database statement for the given database type.\n * E.g., for db.type=\"SQL\", \"SELECT * FROM wuser_table\";\n * for db.type=\"redis\", \"SET mykey 'WuValue'\".\n */\nexports.DB_STATEMENT = 'db.statement';\n/**\n * DB_TYPE (string) Database type. For any SQL database, \"sql\". For others,\n * the lower-case database category, e.g. \"cassandra\", \"hbase\", or \"redis\".\n */\nexports.DB_TYPE = 'db.type';\n/**\n * DB_USER (string) Username for accessing database. E.g., \"readonly_user\"\n * or \"reporting_user\"\n */\nexports.DB_USER = 'db.user';\n//# sourceMappingURL=tags.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Constants = require(\"./constants\");\nvar reference_1 = require(\"./reference\");\nvar span_1 = require(\"./span\");\n/**\n * Return a new REFERENCE_CHILD_OF reference.\n *\n * @param {SpanContext} spanContext - the parent SpanContext instance to\n * reference.\n * @return a REFERENCE_CHILD_OF reference pointing to `spanContext`\n */\nfunction childOf(spanContext) {\n // Allow the user to pass a Span instead of a SpanContext\n if (spanContext instanceof span_1.default) {\n spanContext = spanContext.context();\n }\n return new reference_1.default(Constants.REFERENCE_CHILD_OF, spanContext);\n}\nexports.childOf = childOf;\n/**\n * Return a new REFERENCE_FOLLOWS_FROM reference.\n *\n * @param {SpanContext} spanContext - the parent SpanContext instance to\n * reference.\n * @return a REFERENCE_FOLLOWS_FROM reference pointing to `spanContext`\n */\nfunction followsFrom(spanContext) {\n // Allow the user to pass a Span instead of a SpanContext\n if (spanContext instanceof span_1.default) {\n spanContext = spanContext.context();\n }\n return new reference_1.default(Constants.REFERENCE_FOLLOWS_FROM, spanContext);\n}\nexports.followsFrom = followsFrom;\n//# sourceMappingURL=functions.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tracer_1 = require(\"./tracer\");\nvar noopTracer = new tracer_1.default();\nvar _globalTracer = null;\n// Allows direct importing/requiring of the global tracer:\n//\n// let globalTracer = require('opentracing/global');\n// OR\n// import globalTracer from 'opentracing/global';\n//\n// Acts a bridge to the global tracer that can be safely called before the\n// global tracer is initialized. The purpose of the delegation is to avoid the\n// sometimes nearly intractible initialization order problems that can arise in\n// applications with a complex set of dependencies, while also avoiding the\n// case where\nvar GlobalTracerDelegate = /** @class */ (function (_super) {\n __extends(GlobalTracerDelegate, _super);\n function GlobalTracerDelegate() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GlobalTracerDelegate.prototype.startSpan = function () {\n var tracer = _globalTracer || noopTracer;\n return tracer.startSpan.apply(tracer, arguments);\n };\n GlobalTracerDelegate.prototype.inject = function () {\n var tracer = _globalTracer || noopTracer;\n return tracer.inject.apply(tracer, arguments);\n };\n GlobalTracerDelegate.prototype.extract = function () {\n var tracer = _globalTracer || noopTracer;\n return tracer.extract.apply(tracer, arguments);\n };\n return GlobalTracerDelegate;\n}(tracer_1.default));\nvar globalTracerDelegate = new GlobalTracerDelegate();\n/**\n * Set the global Tracer.\n *\n * The behavior is undefined if this function is called more than once.\n *\n * @param {Tracer} tracer - the Tracer implementation\n */\nfunction initGlobalTracer(tracer) {\n _globalTracer = tracer;\n}\nexports.initGlobalTracer = initGlobalTracer;\n/**\n * Returns the global tracer.\n */\nfunction globalTracer() {\n // Return the delegate. Since the global tracer is largely a convenience\n // (the user can always create their own tracers), the delegate is used to\n // give the added convenience of not needing to worry about initialization\n // order.\n return globalTracerDelegate;\n}\nexports.globalTracer = globalTracer;\n//# sourceMappingURL=global_tracer.js.map","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_carrier_1 = require(\"./binary_carrier\");\nexports.BinaryCarrier = binary_carrier_1.default;\nvar Tags = require(\"./ext/tags\");\nexports.Tags = Tags;\nvar Noop = require(\"./noop\");\nvar reference_1 = require(\"./reference\");\nexports.Reference = reference_1.default;\nvar span_1 = require(\"./span\");\nexports.Span = span_1.default;\nvar span_context_1 = require(\"./span_context\");\nexports.SpanContext = span_context_1.default;\nvar tracer_1 = require(\"./tracer\");\nexports.Tracer = tracer_1.Tracer;\nvar mock_tracer_1 = require(\"./mock_tracer\");\nexports.MockTracer = mock_tracer_1.MockTracer;\n__export(require(\"./global_tracer\"));\n__export(require(\"./constants\"));\n__export(require(\"./functions\"));\n// Initialize the noops last to avoid a dependecy cycle between the classes.\nNoop.initialize();\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar mock_context_1 = require(\"./mock_context\");\nexports.MockContext = mock_context_1.default;\nvar mock_span_1 = require(\"./mock_span\");\nexports.MockSpan = mock_span_1.default;\nvar mock_tracer_1 = require(\"./mock_tracer\");\nexports.MockTracer = mock_tracer_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar opentracing = require(\"../index\");\n/**\n * OpenTracing Context implementation designed for use in\n * unit tests.\n */\nvar MockContext = /** @class */ (function (_super) {\n __extends(MockContext, _super);\n function MockContext(span) {\n var _this = _super.call(this) || this;\n // Store a reference to the span itself since this is a mock tracer\n // intended to make debugging and unit testing easier.\n _this._span = span;\n return _this;\n }\n MockContext.prototype.span = function () {\n return this._span;\n };\n return MockContext;\n}(opentracing.SpanContext));\nexports.MockContext = MockContext;\nexports.default = MockContext;\n//# sourceMappingURL=mock_context.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Index a collection of reported MockSpans in a way that's easy to run unit\n * test assertions against.\n */\nvar MockReport = /** @class */ (function () {\n function MockReport(spans) {\n var _this = this;\n this.spans = spans;\n this.spansByUUID = {};\n this.spansByTag = {};\n this.debugSpans = [];\n this.unfinishedSpans = [];\n spans.forEach(function (span) {\n if (span._finishMs === 0) {\n _this.unfinishedSpans.push(span);\n }\n _this.spansByUUID[span.uuid()] = span;\n _this.debugSpans.push(span.debug());\n var tags = span.tags();\n Object.keys(tags).forEach(function (key) {\n var val = tags[key];\n _this.spansByTag[key] = _this.spansByTag[key] || {};\n _this.spansByTag[key][val] = _this.spansByTag[key][val] || [];\n _this.spansByTag[key][val].push(span);\n });\n });\n }\n MockReport.prototype.firstSpanWithTagValue = function (key, val) {\n var m = this.spansByTag[key];\n if (!m) {\n return null;\n }\n var n = m[val];\n if (!n) {\n return null;\n }\n return n[0];\n };\n return MockReport;\n}());\nexports.MockReport = MockReport;\nexports.default = MockReport;\n//# sourceMappingURL=mock_report.js.map","\"use strict\";\n/* eslint-disable import/no-extraneous-dependencies */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar opentracing = require(\"../index\");\nvar mock_context_1 = require(\"./mock_context\");\n/**\n * OpenTracing Span implementation designed for use in unit tests.\n */\nvar MockSpan = /** @class */ (function (_super) {\n __extends(MockSpan, _super);\n //------------------------------------------------------------------------//\n // MockSpan-specific\n //------------------------------------------------------------------------//\n function MockSpan(tracer) {\n var _this = _super.call(this) || this;\n _this._mockTracer = tracer;\n _this._uuid = _this._generateUUID();\n _this._startMs = Date.now();\n _this._finishMs = 0;\n _this._operationName = '';\n _this._tags = {};\n _this._logs = [];\n return _this;\n }\n //------------------------------------------------------------------------//\n // OpenTracing implementation\n //------------------------------------------------------------------------//\n MockSpan.prototype._context = function () {\n return new mock_context_1.default(this);\n };\n MockSpan.prototype._setOperationName = function (name) {\n this._operationName = name;\n };\n MockSpan.prototype._addTags = function (set) {\n var keys = Object.keys(set);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n this._tags[key] = set[key];\n }\n };\n MockSpan.prototype._log = function (fields, timestamp) {\n this._logs.push({\n fields: fields,\n timestamp: timestamp\n });\n };\n MockSpan.prototype._finish = function (finishTime) {\n this._finishMs = finishTime || Date.now();\n };\n MockSpan.prototype.uuid = function () {\n return this._uuid;\n };\n MockSpan.prototype.operationName = function () {\n return this._operationName;\n };\n MockSpan.prototype.durationMs = function () {\n return this._finishMs - this._startMs;\n };\n MockSpan.prototype.tags = function () {\n return this._tags;\n };\n MockSpan.prototype.tracer = function () {\n return this._mockTracer;\n };\n MockSpan.prototype._generateUUID = function () {\n var p0 = (\"00000000\" + Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)).substr(-8);\n var p1 = (\"00000000\" + Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)).substr(-8);\n return \"\" + p0 + p1;\n };\n MockSpan.prototype.addReference = function (ref) {\n };\n /**\n * Returns a simplified object better for console.log()'ing.\n */\n MockSpan.prototype.debug = function () {\n var obj = {\n uuid: this._uuid,\n operation: this._operationName,\n millis: [this._finishMs - this._startMs, this._startMs, this._finishMs]\n };\n if (Object.keys(this._tags).length) {\n obj.tags = this._tags;\n }\n return obj;\n };\n return MockSpan;\n}(opentracing.Span));\nexports.MockSpan = MockSpan;\nexports.default = MockSpan;\n//# sourceMappingURL=mock_span.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// TODO: Move mock-tracer to its own NPM package once it is complete and tested.\nvar opentracing = require(\"../index\");\nvar mock_report_1 = require(\"./mock_report\");\nvar mock_span_1 = require(\"./mock_span\");\n/**\n * OpenTracing Tracer implementation designed for use in unit tests.\n */\nvar MockTracer = /** @class */ (function (_super) {\n __extends(MockTracer, _super);\n //------------------------------------------------------------------------//\n // MockTracer-specific\n //------------------------------------------------------------------------//\n function MockTracer() {\n var _this = _super.call(this) || this;\n _this._spans = [];\n return _this;\n }\n //------------------------------------------------------------------------//\n // OpenTracing implementation\n //------------------------------------------------------------------------//\n MockTracer.prototype._startSpan = function (name, fields) {\n // _allocSpan is given it's own method so that derived classes can\n // allocate any type of object they want, but not have to duplicate\n // the other common logic in startSpan().\n var span = this._allocSpan();\n span.setOperationName(name);\n this._spans.push(span);\n if (fields.references) {\n for (var _i = 0, _a = fields.references; _i < _a.length; _i++) {\n var ref = _a[_i];\n span.addReference(ref);\n }\n }\n // Capture the stack at the time the span started\n span._startStack = new Error().stack;\n return span;\n };\n MockTracer.prototype._inject = function (span, format, carrier) {\n throw new Error('NOT YET IMPLEMENTED');\n };\n MockTracer.prototype._extract = function (format, carrier) {\n throw new Error('NOT YET IMPLEMENTED');\n };\n MockTracer.prototype._allocSpan = function () {\n return new mock_span_1.default(this);\n };\n /**\n * Discard any buffered data.\n */\n MockTracer.prototype.clear = function () {\n this._spans = [];\n };\n /**\n * Return the buffered data in a format convenient for making unit test\n * assertions.\n */\n MockTracer.prototype.report = function () {\n return new mock_report_1.default(this._spans);\n };\n return MockTracer;\n}(opentracing.Tracer));\nexports.MockTracer = MockTracer;\nexports.default = MockTracer;\n//# sourceMappingURL=mock_tracer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar span_1 = require(\"./span\");\nvar span_context_1 = require(\"./span_context\");\nvar tracer_1 = require(\"./tracer\");\nexports.tracer = null;\nexports.spanContext = null;\nexports.span = null;\n// Deferred initialization to avoid a dependency cycle where Tracer depends on\n// Span which depends on the noop tracer.\nfunction initialize() {\n exports.tracer = new tracer_1.default();\n exports.span = new span_1.default();\n exports.spanContext = new span_context_1.default();\n}\nexports.initialize = initialize;\n//# sourceMappingURL=noop.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar span_1 = require(\"./span\");\n/**\n * Reference pairs a reference type constant (e.g., REFERENCE_CHILD_OF or\n * REFERENCE_FOLLOWS_FROM) with the SpanContext it points to.\n *\n * See the exported childOf() and followsFrom() functions at the package level.\n */\nvar Reference = /** @class */ (function () {\n /**\n * Initialize a new Reference instance.\n *\n * @param {string} type - the Reference type constant (e.g.,\n * REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM).\n * @param {SpanContext} referencedContext - the SpanContext being referred\n * to. As a convenience, a Span instance may be passed in instead\n * (in which case its .context() is used here).\n */\n function Reference(type, referencedContext) {\n this._type = type;\n this._referencedContext = (referencedContext instanceof span_1.default ?\n referencedContext.context() :\n referencedContext);\n }\n /**\n * @return {string} The Reference type (e.g., REFERENCE_CHILD_OF or\n * REFERENCE_FOLLOWS_FROM).\n */\n Reference.prototype.type = function () {\n return this._type;\n };\n /**\n * @return {SpanContext} The SpanContext being referred to (e.g., the\n * parent in a REFERENCE_CHILD_OF Reference).\n */\n Reference.prototype.referencedContext = function () {\n return this._referencedContext;\n };\n return Reference;\n}());\nexports.default = Reference;\n//# sourceMappingURL=reference.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar noop = require(\"./noop\");\n/**\n * Span represents a logical unit of work as part of a broader Trace. Examples\n * of span might include remote procedure calls or a in-process function calls\n * to sub-components. A Trace has a single, top-level \"root\" Span that in turn\n * may have zero or more child Spans, which in turn may have children.\n */\nvar Span = /** @class */ (function () {\n function Span() {\n }\n // ---------------------------------------------------------------------- //\n // OpenTracing API methods\n // ---------------------------------------------------------------------- //\n /**\n * Returns the SpanContext object associated with this Span.\n *\n * @return {SpanContext}\n */\n Span.prototype.context = function () {\n return this._context();\n };\n /**\n * Returns the Tracer object used to create this Span.\n *\n * @return {Tracer}\n */\n Span.prototype.tracer = function () {\n return this._tracer();\n };\n /**\n * Sets the string name for the logical operation this span represents.\n *\n * @param {string} name\n */\n Span.prototype.setOperationName = function (name) {\n this._setOperationName(name);\n return this;\n };\n /**\n * Sets a key:value pair on this Span that also propagates to future\n * children of the associated Span.\n *\n * setBaggageItem() enables powerful functionality given a full-stack\n * opentracing integration (e.g., arbitrary application data from a web\n * client can make it, transparently, all the way into the depths of a\n * storage system), and with it some powerful costs: use this feature with\n * care.\n *\n * IMPORTANT NOTE #1: setBaggageItem() will only propagate baggage items to\n * *future* causal descendants of the associated Span.\n *\n * IMPORTANT NOTE #2: Use this thoughtfully and with care. Every key and\n * value is copied into every local *and remote* child of the associated\n * Span, and that can add up to a lot of network and cpu overhead.\n *\n * @param {string} key\n * @param {string} value\n */\n Span.prototype.setBaggageItem = function (key, value) {\n this._setBaggageItem(key, value);\n return this;\n };\n /**\n * Returns the value for a baggage item given its key.\n *\n * @param {string} key\n * The key for the given trace attribute.\n * @return {string}\n * String value for the given key, or undefined if the key does not\n * correspond to a set trace attribute.\n */\n Span.prototype.getBaggageItem = function (key) {\n return this._getBaggageItem(key);\n };\n /**\n * Adds a single tag to the span. See `addTags()` for details.\n *\n * @param {string} key\n * @param {any} value\n */\n Span.prototype.setTag = function (key, value) {\n // NOTE: the call is normalized to a call to _addTags()\n this._addTags((_a = {}, _a[key] = value, _a));\n return this;\n var _a;\n };\n /**\n * Adds the given key value pairs to the set of span tags.\n *\n * Multiple calls to addTags() results in the tags being the superset of\n * all calls.\n *\n * The behavior of setting the same key multiple times on the same span\n * is undefined.\n *\n * The supported type of the values is implementation-dependent.\n * Implementations are expected to safely handle all types of values but\n * may choose to ignore unrecognized / unhandle-able values (e.g. objects\n * with cyclic references, function objects).\n *\n * @return {[type]} [description]\n */\n Span.prototype.addTags = function (keyValueMap) {\n this._addTags(keyValueMap);\n return this;\n };\n /**\n * Add a log record to this Span, optionally at a user-provided timestamp.\n *\n * For example:\n *\n * span.log({\n * size: rpc.size(), // numeric value\n * URI: rpc.URI(), // string value\n * payload: rpc.payload(), // Object value\n * \"keys can be arbitrary strings\": rpc.foo(),\n * });\n *\n * span.log({\n * \"error.description\": someError.description(),\n * }, someError.timestampMillis());\n *\n * @param {object} keyValuePairs\n * An object mapping string keys to arbitrary value types. All\n * Tracer implementations should support bool, string, and numeric\n * value types, and some may also support Object values.\n * @param {number} timestamp\n * An optional parameter specifying the timestamp in milliseconds\n * since the Unix epoch. Fractional values are allowed so that\n * timestamps with sub-millisecond accuracy can be represented. If\n * not specified, the implementation is expected to use its notion\n * of the current time of the call.\n */\n Span.prototype.log = function (keyValuePairs, timestamp) {\n this._log(keyValuePairs, timestamp);\n return this;\n };\n /**\n * DEPRECATED\n */\n Span.prototype.logEvent = function (eventName, payload) {\n return this._log({ event: eventName, payload: payload });\n };\n /**\n * Sets the end timestamp and finalizes Span state.\n *\n * With the exception of calls to Span.context() (which are always allowed),\n * finish() must be the last call made to any span instance, and to do\n * otherwise leads to undefined behavior.\n *\n * @param {number} finishTime\n * Optional finish time in milliseconds as a Unix timestamp. Decimal\n * values are supported for timestamps with sub-millisecond accuracy.\n * If not specified, the current time (as defined by the\n * implementation) will be used.\n */\n Span.prototype.finish = function (finishTime) {\n this._finish(finishTime);\n // Do not return `this`. The Span generally should not be used after it\n // is finished so chaining is not desired in this context.\n };\n // ---------------------------------------------------------------------- //\n // Derived classes can choose to implement the below\n // ---------------------------------------------------------------------- //\n // By default returns a no-op SpanContext.\n Span.prototype._context = function () {\n return noop.spanContext;\n };\n // By default returns a no-op tracer.\n //\n // The base class could store the tracer that created it, but it does not\n // in order to ensure the no-op span implementation has zero members,\n // which allows V8 to aggressively optimize calls to such objects.\n Span.prototype._tracer = function () {\n return noop.tracer;\n };\n // By default does nothing\n Span.prototype._setOperationName = function (name) {\n };\n // By default does nothing\n Span.prototype._setBaggageItem = function (key, value) {\n };\n // By default does nothing\n Span.prototype._getBaggageItem = function (key) {\n return undefined;\n };\n // By default does nothing\n //\n // NOTE: both setTag() and addTags() map to this function. keyValuePairs\n // will always be an associative array.\n Span.prototype._addTags = function (keyValuePairs) {\n };\n // By default does nothing\n Span.prototype._log = function (keyValuePairs, timestamp) {\n };\n // By default does nothing\n //\n // finishTime is expected to be either a number or undefined.\n Span.prototype._finish = function (finishTime) {\n };\n return Span;\n}());\nexports.Span = Span;\nexports.default = Span;\n//# sourceMappingURL=span.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * SpanContext represents Span state that must propagate to descendant Spans\n * and across process boundaries.\n *\n * SpanContext is logically divided into two pieces: the user-level \"Baggage\"\n * (see setBaggageItem and getBaggageItem) that propagates across Span\n * boundaries and any Tracer-implementation-specific fields that are needed to\n * identify or otherwise contextualize the associated Span instance (e.g., a\n * tuple).\n */\nvar SpanContext = /** @class */ (function () {\n function SpanContext() {\n }\n return SpanContext;\n}());\nexports.SpanContext = SpanContext;\nexports.default = SpanContext;\n//# sourceMappingURL=span_context.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Functions = require(\"./functions\");\nvar Noop = require(\"./noop\");\nvar span_1 = require(\"./span\");\n/**\n * Tracer is the entry-point between the instrumentation API and the tracing\n * implementation.\n *\n * The default object acts as a no-op implementation.\n *\n * Note to implementators: derived classes can choose to directly implement the\n * methods in the \"OpenTracing API methods\" section, or optionally the subset of\n * underscore-prefixed methods to pick up the argument checking and handling\n * automatically from the base class.\n */\nvar Tracer = /** @class */ (function () {\n function Tracer() {\n }\n // ---------------------------------------------------------------------- //\n // OpenTracing API methods\n // ---------------------------------------------------------------------- //\n /**\n * Starts and returns a new Span representing a logical unit of work.\n *\n * For example:\n *\n * // Start a new (parentless) root Span:\n * var parent = Tracer.startSpan('DoWork');\n *\n * // Start a new (child) Span:\n * var child = Tracer.startSpan('load-from-db', {\n * childOf: parent.context(),\n * });\n *\n * // Start a new async (FollowsFrom) Span:\n * var child = Tracer.startSpan('async-cache-write', {\n * references: [\n * opentracing.followsFrom(parent.context())\n * ],\n * });\n *\n * @param {string} name - the name of the operation (REQUIRED).\n * @param {SpanOptions} [options] - options for the newly created span.\n * @return {Span} - a new Span object.\n */\n Tracer.prototype.startSpan = function (name, options) {\n if (options === void 0) { options = {}; }\n // Convert options.childOf to fields.references as needed.\n if (options.childOf) {\n // Convert from a Span or a SpanContext into a Reference.\n var childOf = Functions.childOf(options.childOf);\n if (options.references) {\n options.references.push(childOf);\n }\n else {\n options.references = [childOf];\n }\n delete (options.childOf);\n }\n return this._startSpan(name, options);\n };\n /**\n * Injects the given SpanContext instance for cross-process propagation\n * within `carrier`. The expected type of `carrier` depends on the value of\n * `format.\n *\n * OpenTracing defines a common set of `format` values (see\n * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has\n * an expected carrier type.\n *\n * Consider this pseudocode example:\n *\n * var clientSpan = ...;\n * ...\n * // Inject clientSpan into a text carrier.\n * var headersCarrier = {};\n * Tracer.inject(clientSpan.context(), Tracer.FORMAT_HTTP_HEADERS, headersCarrier);\n * // Incorporate the textCarrier into the outbound HTTP request header\n * // map.\n * Object.assign(outboundHTTPReq.headers, headersCarrier);\n * // ... send the httpReq\n *\n * @param {SpanContext} spanContext - the SpanContext to inject into the\n * carrier object. As a convenience, a Span instance may be passed\n * in instead (in which case its .context() is used for the\n * inject()).\n * @param {string} format - the format of the carrier.\n * @param {any} carrier - see the documentation for the chosen `format`\n * for a description of the carrier object.\n */\n Tracer.prototype.inject = function (spanContext, format, carrier) {\n // Allow the user to pass a Span instead of a SpanContext\n if (spanContext instanceof span_1.default) {\n spanContext = spanContext.context();\n }\n return this._inject(spanContext, format, carrier);\n };\n /**\n * Returns a SpanContext instance extracted from `carrier` in the given\n * `format`.\n *\n * OpenTracing defines a common set of `format` values (see\n * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has\n * an expected carrier type.\n *\n * Consider this pseudocode example:\n *\n * // Use the inbound HTTP request's headers as a text map carrier.\n * var headersCarrier = inboundHTTPReq.headers;\n * var wireCtx = Tracer.extract(Tracer.FORMAT_HTTP_HEADERS, headersCarrier);\n * var serverSpan = Tracer.startSpan('...', { childOf : wireCtx });\n *\n * @param {string} format - the format of the carrier.\n * @param {any} carrier - the type of the carrier object is determined by\n * the format.\n * @return {SpanContext}\n * The extracted SpanContext, or null if no such SpanContext could\n * be found in `carrier`\n */\n Tracer.prototype.extract = function (format, carrier) {\n return this._extract(format, carrier);\n };\n // ---------------------------------------------------------------------- //\n // Derived classes can choose to implement the below\n // ---------------------------------------------------------------------- //\n // NOTE: the input to this method is *always* an associative array. The\n // public-facing startSpan() method normalizes the arguments so that\n // all N implementations do not need to worry about variations in the call\n // signature.\n //\n // The default behavior returns a no-op span.\n Tracer.prototype._startSpan = function (name, fields) {\n return Noop.span;\n };\n // The default behavior is a no-op.\n Tracer.prototype._inject = function (spanContext, format, carrier) {\n };\n // The default behavior is to return a no-op SpanContext.\n Tracer.prototype._extract = function (format, carrier) {\n return Noop.spanContext;\n };\n return Tracer;\n}());\nexports.Tracer = Tracer;\nexports.default = Tracer;\n//# sourceMappingURL=tracer.js.map","// minimal library entry point.\r\n\r\n\"use strict\";\r\nmodule.exports = require(\"./src/index-minimal\");\r\n","\"use strict\";\r\nvar protobuf = exports;\r\n\r\n/**\r\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\r\n * @name build\r\n * @type {string}\r\n * @const\r\n */\r\nprotobuf.build = \"minimal\";\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\n\r\n// Utility\r\nprotobuf.util = require(\"./util/minimal\");\r\nprotobuf.rpc = require(\"./rpc\");\r\nprotobuf.roots = require(\"./roots\");\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(protobuf.BufferReader);\r\n protobuf.util._configure();\r\n}\r\n\r\n// Set up buffer utility according to the environment\r\nprotobuf.Writer._configure(protobuf.BufferWriter);\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nvar util = require(\"./util/minimal\");\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\nvar create_array = typeof Uint8Array !== \"undefined\"\r\n ? function create_typed_array(buffer) {\r\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\r\n }\r\n /* istanbul ignore next */\r\n : function create_array(buffer) {\r\n if (Array.isArray(buffer))\r\n return new Reader(buffer);\r\n throw Error(\"illegal buffer\");\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 Buffer to read from\r\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n * @throws {Error} If `buffer` is not a valid buffer\r\n */\r\nReader.create = util.Buffer\r\n ? function create_buffer_setup(buffer) {\r\n return (Reader.create = function create_buffer(buffer) {\r\n return util.Buffer.isBuffer(buffer)\r\n ? new BufferReader(buffer)\r\n /* istanbul ignore next */\r\n : create_array(buffer);\r\n })(buffer);\r\n }\r\n /* istanbul ignore next */\r\n : create_array;\r\n\r\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ 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\nReader.prototype.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 if */\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\nReader.prototype.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\nReader.prototype.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);\r\n var i = 0;\r\n if (this.len - this.pos > 4) { // fast route (lo)\r\n for (; 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 i = 0;\r\n } else {\r\n for (; i < 3; ++i) {\r\n /* istanbul ignore if */\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n // 1st..3th\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 // 4th\r\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\r\n return bits;\r\n }\r\n if (this.len - this.pos > 4) { // fast route (hi)\r\n for (; 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 < 5; ++i) {\r\n /* istanbul ignore if */\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 /* istanbul ignore next */\r\n throw Error(\"invalid varint encoding\");\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} 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} 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} 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\nReader.prototype.bool = function read_bool() {\r\n return this.uint32() !== 0;\r\n};\r\n\r\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\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 an unsigned 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.fixed32 = function read_fixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4);\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a signed 32 bit integer.\r\n * @returns {number} Value read\r\n */\r\nReader.prototype.sfixed32 = function read_sfixed32() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n return readFixed32_end(this.buf, this.pos += 4) | 0;\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readFixed64(/* this: Reader */) {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n\r\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\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} 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} Value read\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\nReader.prototype.float = function read_float() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readFloatLE(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\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\nReader.prototype.double = function read_double() {\r\n\r\n /* istanbul ignore if */\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n\r\n var value = util.float.readDoubleLE(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\nReader.prototype.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 if */\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n\r\n this.pos += length;\r\n if (Array.isArray(this.buf)) // plain array\r\n return this.buf.slice(start, end);\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\nReader.prototype.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\nReader.prototype.skip = function skip(length) {\r\n if (typeof length === \"number\") {\r\n /* istanbul ignore if */\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 if */\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\nReader.prototype.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 while ((wireType = this.uint32() & 7) !== 4) {\r\n this.skipType(wireType);\r\n }\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\nReader._configure = function(BufferReader_) {\r\n BufferReader = BufferReader_;\r\n\r\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\r\n util.merge(Reader.prototype, {\r\n\r\n int64: function read_int64() {\r\n return readLongVarint.call(this)[fn](false);\r\n },\r\n\r\n uint64: function read_uint64() {\r\n return readLongVarint.call(this)[fn](true);\r\n },\r\n\r\n sint64: function read_sint64() {\r\n return readLongVarint.call(this).zzDecode()[fn](false);\r\n },\r\n\r\n fixed64: function read_fixed64() {\r\n return readFixed64.call(this)[fn](true);\r\n },\r\n\r\n sfixed64: function read_sfixed64() {\r\n return readFixed64.call(this)[fn](false);\r\n }\r\n\r\n });\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferReader;\r\n\r\n// extends Reader\r\nvar Reader = require(\"./reader\");\r\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\r\n\r\nvar util = require(\"./util/minimal\");\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\n * Read buffer.\r\n * @name BufferReader#buf\r\n * @type {Buffer}\r\n */\r\n}\r\n\r\n/* istanbul ignore else */\r\nif (util.Buffer)\r\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReader.prototype.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\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @name BufferReader#bytes\r\n * @function\r\n * @returns {Buffer} Value read\r\n */\r\n","\"use strict\";\r\nmodule.exports = {};\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 * @example\r\n * // pbjs -r myroot -o compiled.js ...\r\n *\r\n * // in another module:\r\n * require(\"./compiled.js\");\r\n *\r\n * // in any subsequent module:\r\n * var root = protobuf.roots[\"myroot\"];\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\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|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {RPCImplCallback} callback Callback function\r\n * @returns {undefined}\r\n * @example\r\n * function rpcImpl(method, requestData, callback) {\r\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\r\n * throw Error(\"no such method\");\r\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\r\n * callback(err, responseData);\r\n * });\r\n * }\r\n */\r\n\r\n/**\r\n * Node-style callback as used by {@link RPCImpl}.\r\n * @typedef RPCImplCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any, otherwise `null`\r\n * @param {Uint8Array|null} [response] 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\nrpc.Service = require(\"./rpc/service\");\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar util = require(\"../util/minimal\");\r\n\r\n// Extends EventEmitter\r\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\r\n\r\n/**\r\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\r\n *\r\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\r\n * @typedef rpc.ServiceMethodCallback\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {TRes} [response] Response message\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\r\n * @typedef rpc.ServiceMethod\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n * @type {function}\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\r\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\r\n */\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 * @exports rpc.Service\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} 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 */\r\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\r\n\r\n if (typeof rpcImpl !== \"function\")\r\n throw TypeError(\"rpcImpl must be a function\");\r\n\r\n util.EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` once the service is ended.\r\n * @type {RPCImpl|null}\r\n */\r\n this.rpcImpl = rpcImpl;\r\n\r\n /**\r\n * Whether requests are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.requestDelimited = Boolean(requestDelimited);\r\n\r\n /**\r\n * Whether responses are length-delimited.\r\n * @type {boolean}\r\n */\r\n this.responseDelimited = Boolean(responseDelimited);\r\n}\r\n\r\n/**\r\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\r\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\r\n * @param {Constructor} requestCtor Request constructor\r\n * @param {Constructor} responseCtor Response constructor\r\n * @param {TReq|Properties} request Request message or plain object\r\n * @param {rpc.ServiceMethodCallback} callback Service callback\r\n * @returns {undefined}\r\n * @template TReq extends Message\r\n * @template TRes extends Message\r\n */\r\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\r\n\r\n if (!request)\r\n throw TypeError(\"request must be specified\");\r\n\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\r\n\r\n if (!self.rpcImpl) {\r\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\r\n return undefined;\r\n }\r\n\r\n try {\r\n return self.rpcImpl(\r\n method,\r\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\r\n function rpcCallback(err, response) {\r\n\r\n if (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n\r\n if (response === null) {\r\n self.end(/* endedByRPC */ true);\r\n return undefined;\r\n }\r\n\r\n if (!(response instanceof responseCtor)) {\r\n try {\r\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n return callback(err);\r\n }\r\n }\r\n\r\n self.emit(\"data\", response, method);\r\n return callback(null, response);\r\n }\r\n );\r\n } catch (err) {\r\n self.emit(\"error\", err, method);\r\n setTimeout(function() { callback(err); }, 0);\r\n return undefined;\r\n }\r\n};\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\nService.prototype.end = function end(endedByRPC) {\r\n if (this.rpcImpl) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.rpcImpl(null, null, null);\r\n this.rpcImpl = null;\r\n this.emit(\"end\").off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(\"../util/minimal\");\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 32 bits, unsigned\r\n * @param {number} hi High 32 bits, unsigned\r\n */\r\nfunction LongBits(lo, hi) {\r\n\r\n // note that the casts below are theoretically unnecessary as of today, but older statically\r\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo >>> 0;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi >>> 0;\r\n}\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 (util.isString(value)) {\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\nLongBits.prototype.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\nLongBits.prototype.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\nLongBits.prototype.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\nLongBits.prototype.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\nLongBits.prototype.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\nLongBits.prototype.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\nvar util = exports;\r\n\r\n// used to return a Promise where callback is omitted\r\nutil.asPromise = require(\"@protobufjs/aspromise\");\r\n\r\n// converts to / from base64 encoded strings\r\nutil.base64 = require(\"@protobufjs/base64\");\r\n\r\n// base class of rpc.Service\r\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\r\n\r\n// float handling accross browsers\r\nutil.float = require(\"@protobufjs/float\");\r\n\r\n// requires modules optionally and hides the call from bundlers\r\nutil.inquire = require(\"@protobufjs/inquire\");\r\n\r\n// converts to / from utf8 encoded strings\r\nutil.utf8 = require(\"@protobufjs/utf8\");\r\n\r\n// provides a node-like buffer pool in the browser\r\nutil.pool = require(\"@protobufjs/pool\");\r\n\r\n// utility to work with the low and high bits of a 64 bit value\r\nutil.LongBits = require(\"./longbits\");\r\n\r\n// global object reference\r\nutil.global = typeof window !== \"undefined\" && window\r\n || typeof global !== \"undefined\" && global\r\n || typeof self !== \"undefined\" && self\r\n || this; // eslint-disable-line no-invalid-this\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n * @const\r\n */\r\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n * @const\r\n */\r\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n * @const\r\n */\r\nutil.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);\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 || /* istanbul ignore next */ 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 * Checks if a property on a message is considered to be present.\r\n * This is an alias of {@link util.isSet}.\r\n * @function\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isset =\r\n\r\n/**\r\n * Checks if a property on a message is considered to be present.\r\n * @param {Object} obj Plain object or message instance\r\n * @param {string} prop Property name\r\n * @returns {boolean} `true` if considered to be present, otherwise `false`\r\n */\r\nutil.isSet = function isSet(obj, prop) {\r\n var value = obj[prop];\r\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\r\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\r\n return false;\r\n};\r\n\r\n/**\r\n * Any compatible Buffer instance.\r\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\r\n * @interface Buffer\r\n * @extends Uint8Array\r\n */\r\n\r\n/**\r\n * Node's Buffer class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Buffer = (function() {\r\n try {\r\n var Buffer = util.inquire(\"buffer\").Buffer;\r\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\r\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\r\n } catch (e) {\r\n /* istanbul ignore next */\r\n return null;\r\n }\r\n})();\r\n\r\n// Internal alias of or polyfull for Buffer.from.\r\nutil._Buffer_from = null;\r\n\r\n// Internal alias of or polyfill for Buffer.allocUnsafe.\r\nutil._Buffer_allocUnsafe = null;\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\r\n * @returns {Uint8Array|Buffer} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(sizeOrArray) {\r\n /* istanbul ignore next */\r\n return typeof sizeOrArray === \"number\"\r\n ? util.Buffer\r\n ? util._Buffer_allocUnsafe(sizeOrArray)\r\n : new util.Array(sizeOrArray)\r\n : util.Buffer\r\n ? util._Buffer_from(sizeOrArray)\r\n : typeof Uint8Array === \"undefined\"\r\n ? sizeOrArray\r\n : new Uint8Array(sizeOrArray);\r\n};\r\n\r\n/**\r\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\r\n * @type {Constructor}\r\n */\r\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\r\n * @interface Long\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 * Long.js's Long class if available.\r\n * @type {Constructor}\r\n */\r\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\r\n || /* istanbul ignore next */ util.global.Long\r\n || util.inquire(\"long\");\r\n\r\n/**\r\n * Regular expression used to verify 2 bit (`bool`) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key2Re = /^true|false|0|1$/;\r\n\r\n/**\r\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\r\n\r\n/**\r\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\r\n * @type {RegExp}\r\n * @const\r\n */\r\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\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 * Merges the properties of the source object into the destination object.\r\n * @memberof util\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\nfunction merge(dst, src, ifNotSet) { // used by converters\r\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n return dst;\r\n}\r\n\r\nutil.merge = merge;\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 * Creates a custom error constructor.\r\n * @memberof util\r\n * @param {string} name Error name\r\n * @returns {Constructor} Custom error constructor\r\n */\r\nfunction newError(name) {\r\n\r\n function CustomError(message, properties) {\r\n\r\n if (!(this instanceof CustomError))\r\n return new CustomError(message, properties);\r\n\r\n // Error.call(this, message);\r\n // ^ just returns a new error instance because the ctor can be called as a function\r\n\r\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\r\n\r\n /* istanbul ignore next */\r\n if (Error.captureStackTrace) // node\r\n Error.captureStackTrace(this, CustomError);\r\n else\r\n Object.defineProperty(this, \"stack\", { value: (new Error()).stack || \"\" });\r\n\r\n if (properties)\r\n merge(this, properties);\r\n }\r\n\r\n (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\r\n\r\n Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\r\n\r\n CustomError.prototype.toString = function toString() {\r\n return this.name + \": \" + this.message;\r\n };\r\n\r\n return CustomError;\r\n}\r\n\r\nutil.newError = newError;\r\n\r\n/**\r\n * Constructs a new protocol error.\r\n * @classdesc Error subclass indicating a protocol specifc error.\r\n * @memberof util\r\n * @extends Error\r\n * @template T extends Message\r\n * @constructor\r\n * @param {string} message Error message\r\n * @param {Object.} [properties] Additional properties\r\n * @example\r\n * try {\r\n * MyMessage.decode(someBuffer); // throws if required fields are missing\r\n * } catch (e) {\r\n * if (e instanceof ProtocolError && e.instance)\r\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\r\n * }\r\n */\r\nutil.ProtocolError = newError(\"ProtocolError\");\r\n\r\n/**\r\n * So far decoded message instance.\r\n * @name util.ProtocolError#instance\r\n * @type {Message}\r\n */\r\n\r\n/**\r\n * A OneOf getter as returned by {@link util.oneOfGetter}.\r\n * @typedef OneOfGetter\r\n * @type {function}\r\n * @returns {string|undefined} Set field name, if any\r\n */\r\n\r\n/**\r\n * Builds a getter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfGetter} Unbound getter\r\n */\r\nutil.oneOfGetter = function getOneOf(fieldNames) {\r\n var fieldMap = {};\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n fieldMap[fieldNames[i]] = 1;\r\n\r\n /**\r\n * @returns {string|undefined} Set field name, if any\r\n * @this Object\r\n * @ignore\r\n */\r\n return function() { // eslint-disable-line consistent-return\r\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\r\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\r\n return keys[i];\r\n };\r\n};\r\n\r\n/**\r\n * A OneOf setter as returned by {@link util.oneOfSetter}.\r\n * @typedef OneOfSetter\r\n * @type {function}\r\n * @param {string|undefined} value Field name\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Builds a setter for a oneof's present field name.\r\n * @param {string[]} fieldNames Field names\r\n * @returns {OneOfSetter} Unbound setter\r\n */\r\nutil.oneOfSetter = function setOneOf(fieldNames) {\r\n\r\n /**\r\n * @param {string} name Field name\r\n * @returns {undefined}\r\n * @this Object\r\n * @ignore\r\n */\r\n return function(name) {\r\n for (var i = 0; i < fieldNames.length; ++i)\r\n if (fieldNames[i] !== name)\r\n delete this[fieldNames[i]];\r\n };\r\n};\r\n\r\n/**\r\n * Default conversion options used for {@link Message#toJSON} implementations.\r\n *\r\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\r\n *\r\n * - Longs become strings\r\n * - Enums become string keys\r\n * - Bytes become base64 encoded strings\r\n * - (Sub-)Messages become plain objects\r\n * - Maps become plain objects with all string keys\r\n * - Repeated fields become arrays\r\n * - NaN and Infinity for float and double fields become strings\r\n *\r\n * @type {IConversionOptions}\r\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\r\n */\r\nutil.toJSONOptions = {\r\n longs: String,\r\n enums: String,\r\n bytes: String,\r\n json: true\r\n};\r\n\r\n// Sets up buffer utility according to the environment (called in index-minimal)\r\nutil._configure = function() {\r\n var Buffer = util.Buffer;\r\n /* istanbul ignore if */\r\n if (!Buffer) {\r\n util._Buffer_from = util._Buffer_allocUnsafe = null;\r\n return;\r\n }\r\n // because node 4.x buffers are incompatible & immutable\r\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\r\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\r\n /* istanbul ignore next */\r\n function Buffer_from(value, encoding) {\r\n return new Buffer(value, encoding);\r\n };\r\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\r\n /* istanbul ignore next */\r\n function Buffer_allocUnsafe(size) {\r\n return new Buffer(size);\r\n };\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nvar util = require(\"./util/minimal\");\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 * @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 * @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 * @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|null}\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|null}\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 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 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\n/* istanbul ignore else */\r\nif (util.Array !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\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 * @private\r\n */\r\nWriter.prototype._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 * Constructs a new varint writer operation instance.\r\n * @classdesc Scheduled varint writer operation.\r\n * @extends Op\r\n * @constructor\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @ignore\r\n */\r\nfunction VarintOp(len, val) {\r\n this.len = len;\r\n this.next = undefined;\r\n this.val = val;\r\n}\r\n\r\nVarintOp.prototype = Object.create(Op.prototype);\r\nVarintOp.prototype.fn = writeVarint32;\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\nWriter.prototype.uint32 = function write_uint32(value) {\r\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\r\n // uint32 is by far the most frequently used operation and benefits significantly from this.\r\n this.len += (this.tail = this.tail.next = new VarintOp(\r\n (value = value >>> 0)\r\n < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5,\r\n value)).len;\r\n return this;\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\nWriter.prototype.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\nWriter.prototype.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\nWriter.prototype.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\nWriter.prototype.int64 = Writer.prototype.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\nWriter.prototype.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\nWriter.prototype.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 + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.fixed32 = function write_fixed32(value) {\r\n return this._push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as fixed 32 bits.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\r\n\r\n/**\r\n * Writes an unsigned 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\nWriter.prototype.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 signed 64 bit value as fixed 64 bits.\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\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\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\nWriter.prototype.float = function write_float(value) {\r\n return this._push(util.float.writeFloatLE, 4, value);\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\nWriter.prototype.double = function write_double(value) {\r\n return this._push(util.float.writeDoubleLE, 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); // also works for plain array values\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\nWriter.prototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n if (!len)\r\n return this._push(writeByte, 1, 0);\r\n if (util.isString(value)) {\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 this.uint32(len)._push(writeBytes, len, value);\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\nWriter.prototype.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\nWriter.prototype.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\nWriter.prototype.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\nWriter.prototype.ldelim = function ldelim() {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset().uint32(len);\r\n if (len) {\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n }\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\nWriter.prototype.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\r\nWriter._configure = function(BufferWriter_) {\r\n BufferWriter = BufferWriter_;\r\n};\r\n","\"use strict\";\r\nmodule.exports = BufferWriter;\r\n\r\n// extends Writer\r\nvar Writer = require(\"./writer\");\r\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\r\n\r\nvar util = require(\"./util/minimal\");\r\n\r\nvar 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 {Buffer} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n return (BufferWriter.alloc = util._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 // also works for plain array values\r\n }\r\n /* istanbul ignore next */\r\n : function writeBytesBuffer_copy(val, buf, pos) {\r\n if (val.copy) // Buffer values\r\n val.copy(buf, pos, 0, val.length);\r\n else for (var i = 0; i < val.length;) // plain array values\r\n buf[pos++] = val[i++];\r\n };\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\r\n if (util.isString(value))\r\n value = util._Buffer_from(value, \"base64\");\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 util.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\nBufferWriter.prototype.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\r\n\r\n/**\r\n * Finishes the write operation.\r\n * @name BufferWriter#finish\r\n * @function\r\n * @returns {Buffer} Finished buffer\r\n */\r\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","// Underscore.js-like wrapper to iterate object key-values. Note that even for completely\n// internal objects, packages may modify default Object prototypes and properties\n// (e.g. Ember.js) so it's almost never safe to assume a particular object can\n// iterated with for-in.\nexport default function _each(obj, cb) {\n if (!obj) {\n return;\n }\n for (let key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n cb(obj[key], key);\n }\n }\n}\n","\nexport const LOG_INFO = 0;\nexport const LOG_WARN = 1;\nexport const LOG_ERROR = 2;\nexport const LOG_FATAL = 3;\n\nexport const LOG_LEVEL_TO_STRING = {\n LOG_INFO : 'I',\n LOG_WARN : 'W',\n LOG_ERROR : 'E',\n LOG_FATAL : 'F',\n};\nexport const LOG_STRING_TO_LEVEL = {\n I : LOG_INFO,\n W : LOG_WARN,\n E : LOG_ERROR,\n F : LOG_FATAL,\n};\n\n// The report interval for empty reports used to sample the clock skew\nexport const CLOCK_STATE_REFRESH_INTERVAL_MS = 350;\n\nexport const LIGHTSTEP_APP_URL_PREFIX = 'https://app.lightstep.com';\n\nexport const JOIN_ID_PREFIX = 'join:';\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport { lightstep } from './generated_proto';\nlet proto = lightstep.collector;\n\nexport default class AuthImp {\n constructor(accessToken) {\n this._accessToken = accessToken;\n }\n\n getAccessToken() {\n return this._accessToken;\n }\n\n toThrift() {\n return new crouton_thrift.Auth({\n access_token : this._accessToken,\n });\n }\n\n toProto() {\n let authProto = new proto.Auth();\n authProto.accessToken = this._accessToken;\n return authProto;\n }\n}\n","\nexport function toString(value) {\n return '' + value; // eslint-disable-line prefer-template\n}\n\nexport function toNumber(value) {\n return Number(value);\n}\n\nexport function toBoolean(value) {\n return !!value;\n}\n","/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\nimport * as $protobuf from 'protobufjs/minimal';\n\n// Common aliases\nconst $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n// Exported root namespace\nconst $root = $protobuf.roots['default'] || ($protobuf.roots['default'] = {});\n\nexport const lightstep = $root.lightstep = (() => {\n\n /**\n * Namespace lightstep.\n * @exports lightstep\n * @namespace\n */\n const lightstep = {};\n\n lightstep.collector = (function () {\n\n /**\n * Namespace collector.\n * @memberof lightstep\n * @namespace\n */\n const collector = {};\n\n collector.SpanContext = (function () {\n\n /**\n * Properties of a SpanContext.\n * @memberof lightstep.collector\n * @interface ISpanContext\n * @property {number|Long|null} [traceId] SpanContext traceId\n * @property {number|Long|null} [spanId] SpanContext spanId\n * @property {Object.|null} [baggage] SpanContext baggage\n */\n\n /**\n * Constructs a new SpanContext.\n * @memberof lightstep.collector\n * @classdesc Represents a SpanContext.\n * @implements ISpanContext\n * @constructor\n * @param {lightstep.collector.ISpanContext=} [properties] Properties to set\n */\n function SpanContext(properties) {\n this.baggage = {};\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SpanContext traceId.\n * @member {number|Long} traceId\n * @memberof lightstep.collector.SpanContext\n * @instance\n */\n SpanContext.prototype.traceId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * SpanContext spanId.\n * @member {number|Long} spanId\n * @memberof lightstep.collector.SpanContext\n * @instance\n */\n SpanContext.prototype.spanId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * SpanContext baggage.\n * @member {Object.} baggage\n * @memberof lightstep.collector.SpanContext\n * @instance\n */\n SpanContext.prototype.baggage = $util.emptyObject;\n\n /**\n * Creates a new SpanContext instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {lightstep.collector.ISpanContext=} [properties] Properties to set\n * @returns {lightstep.collector.SpanContext} SpanContext instance\n */\n SpanContext.create = function create(properties) {\n return new SpanContext(properties);\n };\n\n /**\n * Encodes the specified SpanContext message. Does not implicitly {@link lightstep.collector.SpanContext.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {lightstep.collector.ISpanContext} message SpanContext message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SpanContext.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.traceId != null && message.hasOwnProperty('traceId'))\n writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.traceId);\n if (message.spanId != null && message.hasOwnProperty('spanId'))\n writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.spanId);\n if (message.baggage != null && message.hasOwnProperty('baggage'))\n for (let keys = Object.keys(message.baggage), i = 0; i < keys.length; ++i)\n writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.baggage[keys[i]]).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified SpanContext message, length delimited. Does not implicitly {@link lightstep.collector.SpanContext.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {lightstep.collector.ISpanContext} message SpanContext message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SpanContext.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SpanContext message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.SpanContext} SpanContext\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SpanContext.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.SpanContext(), key;\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.traceId = reader.uint64();\n break;\n case 2:\n message.spanId = reader.uint64();\n break;\n case 3:\n reader.skip().pos++;\n if (message.baggage === $util.emptyObject)\n message.baggage = {};\n key = reader.string();\n reader.pos++;\n message.baggage[key] = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SpanContext message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.SpanContext} SpanContext\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SpanContext.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SpanContext message.\n * @function verify\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SpanContext.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.traceId != null && message.hasOwnProperty('traceId'))\n if (!$util.isInteger(message.traceId) && !(message.traceId && $util.isInteger(message.traceId.low) && $util.isInteger(message.traceId.high)))\n return 'traceId: integer|Long expected';\n if (message.spanId != null && message.hasOwnProperty('spanId'))\n if (!$util.isInteger(message.spanId) && !(message.spanId && $util.isInteger(message.spanId.low) && $util.isInteger(message.spanId.high)))\n return 'spanId: integer|Long expected';\n if (message.baggage != null && message.hasOwnProperty('baggage')) {\n if (!$util.isObject(message.baggage))\n return 'baggage: object expected';\n let key = Object.keys(message.baggage);\n for (let i = 0; i < key.length; ++i)\n if (!$util.isString(message.baggage[key[i]]))\n return 'baggage: string{k:string} expected';\n }\n return null;\n };\n\n /**\n * Creates a SpanContext message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.SpanContext} SpanContext\n */\n SpanContext.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.SpanContext)\n return object;\n let message = new $root.lightstep.collector.SpanContext();\n if (object.traceId != null)\n if ($util.Long)\n (message.traceId = $util.Long.fromValue(object.traceId)).unsigned = true;\n else if (typeof object.traceId === 'string')\n message.traceId = parseInt(object.traceId, 10);\n else if (typeof object.traceId === 'number')\n message.traceId = object.traceId;\n else if (typeof object.traceId === 'object')\n message.traceId = new $util.LongBits(object.traceId.low >>> 0, object.traceId.high >>> 0).toNumber(true);\n if (object.spanId != null)\n if ($util.Long)\n (message.spanId = $util.Long.fromValue(object.spanId)).unsigned = true;\n else if (typeof object.spanId === 'string')\n message.spanId = parseInt(object.spanId, 10);\n else if (typeof object.spanId === 'number')\n message.spanId = object.spanId;\n else if (typeof object.spanId === 'object')\n message.spanId = new $util.LongBits(object.spanId.low >>> 0, object.spanId.high >>> 0).toNumber(true);\n if (object.baggage) {\n if (typeof object.baggage !== 'object')\n throw TypeError('.lightstep.collector.SpanContext.baggage: object expected');\n message.baggage = {};\n for (let keys = Object.keys(object.baggage), i = 0; i < keys.length; ++i)\n message.baggage[keys[i]] = String(object.baggage[keys[i]]);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a SpanContext message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.SpanContext\n * @static\n * @param {lightstep.collector.SpanContext} message SpanContext\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n SpanContext.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.objects || options.defaults)\n object.baggage = {};\n if (options.defaults) {\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.traceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.traceId = options.longs === String ? '0' : 0;\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.spanId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.spanId = options.longs === String ? '0' : 0;\n }\n if (message.traceId != null && message.hasOwnProperty('traceId'))\n if (typeof message.traceId === 'number')\n object.traceId = options.longs === String ? String(message.traceId) : message.traceId;\n else\n object.traceId = options.longs === String ? $util.Long.prototype.toString.call(message.traceId) : options.longs === Number ? new $util.LongBits(message.traceId.low >>> 0, message.traceId.high >>> 0).toNumber(true) : message.traceId;\n if (message.spanId != null && message.hasOwnProperty('spanId'))\n if (typeof message.spanId === 'number')\n object.spanId = options.longs === String ? String(message.spanId) : message.spanId;\n else\n object.spanId = options.longs === String ? $util.Long.prototype.toString.call(message.spanId) : options.longs === Number ? new $util.LongBits(message.spanId.low >>> 0, message.spanId.high >>> 0).toNumber(true) : message.spanId;\n let keys2;\n if (message.baggage && (keys2 = Object.keys(message.baggage)).length) {\n object.baggage = {};\n for (let j = 0; j < keys2.length; ++j)\n object.baggage[keys2[j]] = message.baggage[keys2[j]];\n }\n return object;\n };\n\n /**\n * Converts this SpanContext to JSON.\n * @function toJSON\n * @memberof lightstep.collector.SpanContext\n * @instance\n * @returns {Object.} JSON object\n */\n SpanContext.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return SpanContext;\n })();\n\n collector.KeyValue = (function () {\n\n /**\n * Properties of a KeyValue.\n * @memberof lightstep.collector\n * @interface IKeyValue\n * @property {string|null} [key] KeyValue key\n * @property {string|null} [stringValue] KeyValue stringValue\n * @property {number|Long|null} [intValue] KeyValue intValue\n * @property {number|null} [doubleValue] KeyValue doubleValue\n * @property {boolean|null} [boolValue] KeyValue boolValue\n * @property {string|null} [jsonValue] KeyValue jsonValue\n */\n\n /**\n * Constructs a new KeyValue.\n * @memberof lightstep.collector\n * @classdesc Represents a KeyValue.\n * @implements IKeyValue\n * @constructor\n * @param {lightstep.collector.IKeyValue=} [properties] Properties to set\n */\n function KeyValue(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * KeyValue key.\n * @member {string} key\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.key = '';\n\n /**\n * KeyValue stringValue.\n * @member {string} stringValue\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.stringValue = '';\n\n /**\n * KeyValue intValue.\n * @member {number|Long} intValue\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.intValue = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * KeyValue doubleValue.\n * @member {number} doubleValue\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.doubleValue = 0;\n\n /**\n * KeyValue boolValue.\n * @member {boolean} boolValue\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.boolValue = false;\n\n /**\n * KeyValue jsonValue.\n * @member {string} jsonValue\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n KeyValue.prototype.jsonValue = '';\n\n // OneOf field names bound to virtual getters and setters\n let $oneOfFields;\n\n /**\n * KeyValue value.\n * @member {\"stringValue\"|\"intValue\"|\"doubleValue\"|\"boolValue\"|\"jsonValue\"|undefined} value\n * @memberof lightstep.collector.KeyValue\n * @instance\n */\n Object.defineProperty(KeyValue.prototype, 'value', {\n get: $util.oneOfGetter($oneOfFields = ['stringValue', 'intValue', 'doubleValue', 'boolValue', 'jsonValue']),\n set: $util.oneOfSetter($oneOfFields)\n });\n\n /**\n * Creates a new KeyValue instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {lightstep.collector.IKeyValue=} [properties] Properties to set\n * @returns {lightstep.collector.KeyValue} KeyValue instance\n */\n KeyValue.create = function create(properties) {\n return new KeyValue(properties);\n };\n\n /**\n * Encodes the specified KeyValue message. Does not implicitly {@link lightstep.collector.KeyValue.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {lightstep.collector.IKeyValue} message KeyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValue.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.key != null && message.hasOwnProperty('key'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);\n if (message.stringValue != null && message.hasOwnProperty('stringValue'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringValue);\n if (message.intValue != null && message.hasOwnProperty('intValue'))\n writer.uint32(/* id 3, wireType 0 =*/24).int64(message.intValue);\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue'))\n writer.uint32(/* id 4, wireType 1 =*/33).double(message.doubleValue);\n if (message.boolValue != null && message.hasOwnProperty('boolValue'))\n writer.uint32(/* id 5, wireType 0 =*/40).bool(message.boolValue);\n if (message.jsonValue != null && message.hasOwnProperty('jsonValue'))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.jsonValue);\n return writer;\n };\n\n /**\n * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link lightstep.collector.KeyValue.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {lightstep.collector.IKeyValue} message KeyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValue.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a KeyValue message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.KeyValue} KeyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValue.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.KeyValue();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.key = reader.string();\n break;\n case 2:\n message.stringValue = reader.string();\n break;\n case 3:\n message.intValue = reader.int64();\n break;\n case 4:\n message.doubleValue = reader.double();\n break;\n case 5:\n message.boolValue = reader.bool();\n break;\n case 6:\n message.jsonValue = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a KeyValue message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.KeyValue} KeyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValue.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a KeyValue message.\n * @function verify\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n KeyValue.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n let properties = {};\n if (message.key != null && message.hasOwnProperty('key'))\n if (!$util.isString(message.key))\n return 'key: string expected';\n if (message.stringValue != null && message.hasOwnProperty('stringValue')) {\n properties.value = 1;\n if (!$util.isString(message.stringValue))\n return 'stringValue: string expected';\n }\n if (message.intValue != null && message.hasOwnProperty('intValue')) {\n if (properties.value === 1)\n return 'value: multiple values';\n properties.value = 1;\n if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high)))\n return 'intValue: integer|Long expected';\n }\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue')) {\n if (properties.value === 1)\n return 'value: multiple values';\n properties.value = 1;\n if (typeof message.doubleValue !== 'number')\n return 'doubleValue: number expected';\n }\n if (message.boolValue != null && message.hasOwnProperty('boolValue')) {\n if (properties.value === 1)\n return 'value: multiple values';\n properties.value = 1;\n if (typeof message.boolValue !== 'boolean')\n return 'boolValue: boolean expected';\n }\n if (message.jsonValue != null && message.hasOwnProperty('jsonValue')) {\n if (properties.value === 1)\n return 'value: multiple values';\n properties.value = 1;\n if (!$util.isString(message.jsonValue))\n return 'jsonValue: string expected';\n }\n return null;\n };\n\n /**\n * Creates a KeyValue message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.KeyValue} KeyValue\n */\n KeyValue.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.KeyValue)\n return object;\n let message = new $root.lightstep.collector.KeyValue();\n if (object.key != null)\n message.key = String(object.key);\n if (object.stringValue != null)\n message.stringValue = String(object.stringValue);\n if (object.intValue != null)\n if ($util.Long)\n (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false;\n else if (typeof object.intValue === 'string')\n message.intValue = parseInt(object.intValue, 10);\n else if (typeof object.intValue === 'number')\n message.intValue = object.intValue;\n else if (typeof object.intValue === 'object')\n message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber();\n if (object.doubleValue != null)\n message.doubleValue = Number(object.doubleValue);\n if (object.boolValue != null)\n message.boolValue = Boolean(object.boolValue);\n if (object.jsonValue != null)\n message.jsonValue = String(object.jsonValue);\n return message;\n };\n\n /**\n * Creates a plain object from a KeyValue message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.KeyValue\n * @static\n * @param {lightstep.collector.KeyValue} message KeyValue\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n KeyValue.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults)\n object.key = '';\n if (message.key != null && message.hasOwnProperty('key'))\n object.key = message.key;\n if (message.stringValue != null && message.hasOwnProperty('stringValue')) {\n object.stringValue = message.stringValue;\n if (options.oneofs)\n object.value = 'stringValue';\n }\n if (message.intValue != null && message.hasOwnProperty('intValue')) {\n if (typeof message.intValue === 'number')\n object.intValue = options.longs === String ? String(message.intValue) : message.intValue;\n else\n object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue;\n if (options.oneofs)\n object.value = 'intValue';\n }\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue')) {\n object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;\n if (options.oneofs)\n object.value = 'doubleValue';\n }\n if (message.boolValue != null && message.hasOwnProperty('boolValue')) {\n object.boolValue = message.boolValue;\n if (options.oneofs)\n object.value = 'boolValue';\n }\n if (message.jsonValue != null && message.hasOwnProperty('jsonValue')) {\n object.jsonValue = message.jsonValue;\n if (options.oneofs)\n object.value = 'jsonValue';\n }\n return object;\n };\n\n /**\n * Converts this KeyValue to JSON.\n * @function toJSON\n * @memberof lightstep.collector.KeyValue\n * @instance\n * @returns {Object.} JSON object\n */\n KeyValue.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return KeyValue;\n })();\n\n collector.Log = (function () {\n\n /**\n * Properties of a Log.\n * @memberof lightstep.collector\n * @interface ILog\n * @property {google.protobuf.ITimestamp|null} [timestamp] Log timestamp\n * @property {Array.|null} [fields] Log fields\n */\n\n /**\n * Constructs a new Log.\n * @memberof lightstep.collector\n * @classdesc Represents a Log.\n * @implements ILog\n * @constructor\n * @param {lightstep.collector.ILog=} [properties] Properties to set\n */\n function Log(properties) {\n this.fields = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Log timestamp.\n * @member {google.protobuf.ITimestamp|null|undefined} timestamp\n * @memberof lightstep.collector.Log\n * @instance\n */\n Log.prototype.timestamp = null;\n\n /**\n * Log fields.\n * @member {Array.} fields\n * @memberof lightstep.collector.Log\n * @instance\n */\n Log.prototype.fields = $util.emptyArray;\n\n /**\n * Creates a new Log instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Log\n * @static\n * @param {lightstep.collector.ILog=} [properties] Properties to set\n * @returns {lightstep.collector.Log} Log instance\n */\n Log.create = function create(properties) {\n return new Log(properties);\n };\n\n /**\n * Encodes the specified Log message. Does not implicitly {@link lightstep.collector.Log.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Log\n * @static\n * @param {lightstep.collector.ILog} message Log message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Log.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.timestamp != null && message.hasOwnProperty('timestamp'))\n $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.fields != null && message.fields.length)\n for (let i = 0; i < message.fields.length; ++i)\n $root.lightstep.collector.KeyValue.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Log message, length delimited. Does not implicitly {@link lightstep.collector.Log.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Log\n * @static\n * @param {lightstep.collector.ILog} message Log message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Log.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Log message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Log\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Log} Log\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Log.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Log();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());\n break;\n case 2:\n if (!(message.fields && message.fields.length))\n message.fields = [];\n message.fields.push($root.lightstep.collector.KeyValue.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Log message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Log\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Log} Log\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Log.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Log message.\n * @function verify\n * @memberof lightstep.collector.Log\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Log.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.timestamp != null && message.hasOwnProperty('timestamp')) {\n let error = $root.google.protobuf.Timestamp.verify(message.timestamp);\n if (error)\n return 'timestamp.' + error;\n }\n if (message.fields != null && message.hasOwnProperty('fields')) {\n if (!Array.isArray(message.fields))\n return 'fields: array expected';\n for (let i = 0; i < message.fields.length; ++i) {\n let error = $root.lightstep.collector.KeyValue.verify(message.fields[i]);\n if (error)\n return 'fields.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a Log message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Log\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Log} Log\n */\n Log.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Log)\n return object;\n let message = new $root.lightstep.collector.Log();\n if (object.timestamp != null) {\n if (typeof object.timestamp !== 'object')\n throw TypeError('.lightstep.collector.Log.timestamp: object expected');\n message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp);\n }\n if (object.fields) {\n if (!Array.isArray(object.fields))\n throw TypeError('.lightstep.collector.Log.fields: array expected');\n message.fields = [];\n for (let i = 0; i < object.fields.length; ++i) {\n if (typeof object.fields[i] !== 'object')\n throw TypeError('.lightstep.collector.Log.fields: object expected');\n message.fields[i] = $root.lightstep.collector.KeyValue.fromObject(object.fields[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Log message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Log\n * @static\n * @param {lightstep.collector.Log} message Log\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Log.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.fields = [];\n if (options.defaults)\n object.timestamp = null;\n if (message.timestamp != null && message.hasOwnProperty('timestamp'))\n object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options);\n if (message.fields && message.fields.length) {\n object.fields = [];\n for (let j = 0; j < message.fields.length; ++j)\n object.fields[j] = $root.lightstep.collector.KeyValue.toObject(message.fields[j], options);\n }\n return object;\n };\n\n /**\n * Converts this Log to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Log\n * @instance\n * @returns {Object.} JSON object\n */\n Log.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Log;\n })();\n\n collector.Reference = (function () {\n\n /**\n * Properties of a Reference.\n * @memberof lightstep.collector\n * @interface IReference\n * @property {lightstep.collector.Reference.Relationship|null} [relationship] Reference relationship\n * @property {lightstep.collector.ISpanContext|null} [spanContext] Reference spanContext\n */\n\n /**\n * Constructs a new Reference.\n * @memberof lightstep.collector\n * @classdesc Represents a Reference.\n * @implements IReference\n * @constructor\n * @param {lightstep.collector.IReference=} [properties] Properties to set\n */\n function Reference(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Reference relationship.\n * @member {lightstep.collector.Reference.Relationship} relationship\n * @memberof lightstep.collector.Reference\n * @instance\n */\n Reference.prototype.relationship = 0;\n\n /**\n * Reference spanContext.\n * @member {lightstep.collector.ISpanContext|null|undefined} spanContext\n * @memberof lightstep.collector.Reference\n * @instance\n */\n Reference.prototype.spanContext = null;\n\n /**\n * Creates a new Reference instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Reference\n * @static\n * @param {lightstep.collector.IReference=} [properties] Properties to set\n * @returns {lightstep.collector.Reference} Reference instance\n */\n Reference.create = function create(properties) {\n return new Reference(properties);\n };\n\n /**\n * Encodes the specified Reference message. Does not implicitly {@link lightstep.collector.Reference.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Reference\n * @static\n * @param {lightstep.collector.IReference} message Reference message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reference.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.relationship != null && message.hasOwnProperty('relationship'))\n writer.uint32(/* id 1, wireType 0 =*/8).int32(message.relationship);\n if (message.spanContext != null && message.hasOwnProperty('spanContext'))\n $root.lightstep.collector.SpanContext.encode(message.spanContext, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Reference message, length delimited. Does not implicitly {@link lightstep.collector.Reference.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Reference\n * @static\n * @param {lightstep.collector.IReference} message Reference message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reference.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Reference message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Reference\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Reference} Reference\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reference.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Reference();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.relationship = reader.int32();\n break;\n case 2:\n message.spanContext = $root.lightstep.collector.SpanContext.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Reference message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Reference\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Reference} Reference\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reference.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Reference message.\n * @function verify\n * @memberof lightstep.collector.Reference\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Reference.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.relationship != null && message.hasOwnProperty('relationship'))\n switch (message.relationship) {\n default:\n return 'relationship: enum value expected';\n case 0:\n case 1:\n break;\n }\n if (message.spanContext != null && message.hasOwnProperty('spanContext')) {\n let error = $root.lightstep.collector.SpanContext.verify(message.spanContext);\n if (error)\n return 'spanContext.' + error;\n }\n return null;\n };\n\n /**\n * Creates a Reference message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Reference\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Reference} Reference\n */\n Reference.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Reference)\n return object;\n let message = new $root.lightstep.collector.Reference();\n switch (object.relationship) {\n case 'CHILD_OF':\n case 0:\n message.relationship = 0;\n break;\n case 'FOLLOWS_FROM':\n case 1:\n message.relationship = 1;\n break;\n }\n if (object.spanContext != null) {\n if (typeof object.spanContext !== 'object')\n throw TypeError('.lightstep.collector.Reference.spanContext: object expected');\n message.spanContext = $root.lightstep.collector.SpanContext.fromObject(object.spanContext);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Reference message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Reference\n * @static\n * @param {lightstep.collector.Reference} message Reference\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Reference.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.relationship = options.enums === String ? 'CHILD_OF' : 0;\n object.spanContext = null;\n }\n if (message.relationship != null && message.hasOwnProperty('relationship'))\n object.relationship = options.enums === String ? $root.lightstep.collector.Reference.Relationship[message.relationship] : message.relationship;\n if (message.spanContext != null && message.hasOwnProperty('spanContext'))\n object.spanContext = $root.lightstep.collector.SpanContext.toObject(message.spanContext, options);\n return object;\n };\n\n /**\n * Converts this Reference to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Reference\n * @instance\n * @returns {Object.} JSON object\n */\n Reference.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n /**\n * Relationship enum.\n * @name lightstep.collector.Reference.Relationship\n * @enum {string}\n * @property {number} CHILD_OF=0 CHILD_OF value\n * @property {number} FOLLOWS_FROM=1 FOLLOWS_FROM value\n */\n Reference.Relationship = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = 'CHILD_OF'] = 0;\n values[valuesById[1] = 'FOLLOWS_FROM'] = 1;\n return values;\n })();\n\n return Reference;\n })();\n\n collector.Span = (function () {\n\n /**\n * Properties of a Span.\n * @memberof lightstep.collector\n * @interface ISpan\n * @property {lightstep.collector.ISpanContext|null} [spanContext] Span spanContext\n * @property {string|null} [operationName] Span operationName\n * @property {Array.|null} [references] Span references\n * @property {google.protobuf.ITimestamp|null} [startTimestamp] Span startTimestamp\n * @property {number|Long|null} [durationMicros] Span durationMicros\n * @property {Array.|null} [tags] Span tags\n * @property {Array.|null} [logs] Span logs\n */\n\n /**\n * Constructs a new Span.\n * @memberof lightstep.collector\n * @classdesc Represents a Span.\n * @implements ISpan\n * @constructor\n * @param {lightstep.collector.ISpan=} [properties] Properties to set\n */\n function Span(properties) {\n this.references = [];\n this.tags = [];\n this.logs = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Span spanContext.\n * @member {lightstep.collector.ISpanContext|null|undefined} spanContext\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.spanContext = null;\n\n /**\n * Span operationName.\n * @member {string} operationName\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.operationName = '';\n\n /**\n * Span references.\n * @member {Array.} references\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.references = $util.emptyArray;\n\n /**\n * Span startTimestamp.\n * @member {google.protobuf.ITimestamp|null|undefined} startTimestamp\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.startTimestamp = null;\n\n /**\n * Span durationMicros.\n * @member {number|Long} durationMicros\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.durationMicros = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * Span tags.\n * @member {Array.} tags\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.tags = $util.emptyArray;\n\n /**\n * Span logs.\n * @member {Array.} logs\n * @memberof lightstep.collector.Span\n * @instance\n */\n Span.prototype.logs = $util.emptyArray;\n\n /**\n * Creates a new Span instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Span\n * @static\n * @param {lightstep.collector.ISpan=} [properties] Properties to set\n * @returns {lightstep.collector.Span} Span instance\n */\n Span.create = function create(properties) {\n return new Span(properties);\n };\n\n /**\n * Encodes the specified Span message. Does not implicitly {@link lightstep.collector.Span.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Span\n * @static\n * @param {lightstep.collector.ISpan} message Span message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Span.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.spanContext != null && message.hasOwnProperty('spanContext'))\n $root.lightstep.collector.SpanContext.encode(message.spanContext, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.operationName != null && message.hasOwnProperty('operationName'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.operationName);\n if (message.references != null && message.references.length)\n for (let i = 0; i < message.references.length; ++i)\n $root.lightstep.collector.Reference.encode(message.references[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp'))\n $root.google.protobuf.Timestamp.encode(message.startTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.durationMicros);\n if (message.tags != null && message.tags.length)\n for (let i = 0; i < message.tags.length; ++i)\n $root.lightstep.collector.KeyValue.encode(message.tags[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.logs != null && message.logs.length)\n for (let i = 0; i < message.logs.length; ++i)\n $root.lightstep.collector.Log.encode(message.logs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Span message, length delimited. Does not implicitly {@link lightstep.collector.Span.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Span\n * @static\n * @param {lightstep.collector.ISpan} message Span message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Span.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Span message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Span\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Span} Span\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Span.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Span();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.spanContext = $root.lightstep.collector.SpanContext.decode(reader, reader.uint32());\n break;\n case 2:\n message.operationName = reader.string();\n break;\n case 3:\n if (!(message.references && message.references.length))\n message.references = [];\n message.references.push($root.lightstep.collector.Reference.decode(reader, reader.uint32()));\n break;\n case 4:\n message.startTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());\n break;\n case 5:\n message.durationMicros = reader.uint64();\n break;\n case 6:\n if (!(message.tags && message.tags.length))\n message.tags = [];\n message.tags.push($root.lightstep.collector.KeyValue.decode(reader, reader.uint32()));\n break;\n case 7:\n if (!(message.logs && message.logs.length))\n message.logs = [];\n message.logs.push($root.lightstep.collector.Log.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Span message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Span\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Span} Span\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Span.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Span message.\n * @function verify\n * @memberof lightstep.collector.Span\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Span.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.spanContext != null && message.hasOwnProperty('spanContext')) {\n let error = $root.lightstep.collector.SpanContext.verify(message.spanContext);\n if (error)\n return 'spanContext.' + error;\n }\n if (message.operationName != null && message.hasOwnProperty('operationName'))\n if (!$util.isString(message.operationName))\n return 'operationName: string expected';\n if (message.references != null && message.hasOwnProperty('references')) {\n if (!Array.isArray(message.references))\n return 'references: array expected';\n for (let i = 0; i < message.references.length; ++i) {\n let error = $root.lightstep.collector.Reference.verify(message.references[i]);\n if (error)\n return 'references.' + error;\n }\n }\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp')) {\n let error = $root.google.protobuf.Timestamp.verify(message.startTimestamp);\n if (error)\n return 'startTimestamp.' + error;\n }\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n if (!$util.isInteger(message.durationMicros) && !(message.durationMicros && $util.isInteger(message.durationMicros.low) && $util.isInteger(message.durationMicros.high)))\n return 'durationMicros: integer|Long expected';\n if (message.tags != null && message.hasOwnProperty('tags')) {\n if (!Array.isArray(message.tags))\n return 'tags: array expected';\n for (let i = 0; i < message.tags.length; ++i) {\n let error = $root.lightstep.collector.KeyValue.verify(message.tags[i]);\n if (error)\n return 'tags.' + error;\n }\n }\n if (message.logs != null && message.hasOwnProperty('logs')) {\n if (!Array.isArray(message.logs))\n return 'logs: array expected';\n for (let i = 0; i < message.logs.length; ++i) {\n let error = $root.lightstep.collector.Log.verify(message.logs[i]);\n if (error)\n return 'logs.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a Span message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Span\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Span} Span\n */\n Span.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Span)\n return object;\n let message = new $root.lightstep.collector.Span();\n if (object.spanContext != null) {\n if (typeof object.spanContext !== 'object')\n throw TypeError('.lightstep.collector.Span.spanContext: object expected');\n message.spanContext = $root.lightstep.collector.SpanContext.fromObject(object.spanContext);\n }\n if (object.operationName != null)\n message.operationName = String(object.operationName);\n if (object.references) {\n if (!Array.isArray(object.references))\n throw TypeError('.lightstep.collector.Span.references: array expected');\n message.references = [];\n for (let i = 0; i < object.references.length; ++i) {\n if (typeof object.references[i] !== 'object')\n throw TypeError('.lightstep.collector.Span.references: object expected');\n message.references[i] = $root.lightstep.collector.Reference.fromObject(object.references[i]);\n }\n }\n if (object.startTimestamp != null) {\n if (typeof object.startTimestamp !== 'object')\n throw TypeError('.lightstep.collector.Span.startTimestamp: object expected');\n message.startTimestamp = $root.google.protobuf.Timestamp.fromObject(object.startTimestamp);\n }\n if (object.durationMicros != null)\n if ($util.Long)\n (message.durationMicros = $util.Long.fromValue(object.durationMicros)).unsigned = true;\n else if (typeof object.durationMicros === 'string')\n message.durationMicros = parseInt(object.durationMicros, 10);\n else if (typeof object.durationMicros === 'number')\n message.durationMicros = object.durationMicros;\n else if (typeof object.durationMicros === 'object')\n message.durationMicros = new $util.LongBits(object.durationMicros.low >>> 0, object.durationMicros.high >>> 0).toNumber(true);\n if (object.tags) {\n if (!Array.isArray(object.tags))\n throw TypeError('.lightstep.collector.Span.tags: array expected');\n message.tags = [];\n for (let i = 0; i < object.tags.length; ++i) {\n if (typeof object.tags[i] !== 'object')\n throw TypeError('.lightstep.collector.Span.tags: object expected');\n message.tags[i] = $root.lightstep.collector.KeyValue.fromObject(object.tags[i]);\n }\n }\n if (object.logs) {\n if (!Array.isArray(object.logs))\n throw TypeError('.lightstep.collector.Span.logs: array expected');\n message.logs = [];\n for (let i = 0; i < object.logs.length; ++i) {\n if (typeof object.logs[i] !== 'object')\n throw TypeError('.lightstep.collector.Span.logs: object expected');\n message.logs[i] = $root.lightstep.collector.Log.fromObject(object.logs[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Span message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Span\n * @static\n * @param {lightstep.collector.Span} message Span\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Span.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.references = [];\n object.tags = [];\n object.logs = [];\n }\n if (options.defaults) {\n object.spanContext = null;\n object.operationName = '';\n object.startTimestamp = null;\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.durationMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.durationMicros = options.longs === String ? '0' : 0;\n }\n if (message.spanContext != null && message.hasOwnProperty('spanContext'))\n object.spanContext = $root.lightstep.collector.SpanContext.toObject(message.spanContext, options);\n if (message.operationName != null && message.hasOwnProperty('operationName'))\n object.operationName = message.operationName;\n if (message.references && message.references.length) {\n object.references = [];\n for (let j = 0; j < message.references.length; ++j)\n object.references[j] = $root.lightstep.collector.Reference.toObject(message.references[j], options);\n }\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp'))\n object.startTimestamp = $root.google.protobuf.Timestamp.toObject(message.startTimestamp, options);\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n if (typeof message.durationMicros === 'number')\n object.durationMicros = options.longs === String ? String(message.durationMicros) : message.durationMicros;\n else\n object.durationMicros = options.longs === String ? $util.Long.prototype.toString.call(message.durationMicros) : options.longs === Number ? new $util.LongBits(message.durationMicros.low >>> 0, message.durationMicros.high >>> 0).toNumber(true) : message.durationMicros;\n if (message.tags && message.tags.length) {\n object.tags = [];\n for (let j = 0; j < message.tags.length; ++j)\n object.tags[j] = $root.lightstep.collector.KeyValue.toObject(message.tags[j], options);\n }\n if (message.logs && message.logs.length) {\n object.logs = [];\n for (let j = 0; j < message.logs.length; ++j)\n object.logs[j] = $root.lightstep.collector.Log.toObject(message.logs[j], options);\n }\n return object;\n };\n\n /**\n * Converts this Span to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Span\n * @instance\n * @returns {Object.} JSON object\n */\n Span.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Span;\n })();\n\n collector.Reporter = (function () {\n\n /**\n * Properties of a Reporter.\n * @memberof lightstep.collector\n * @interface IReporter\n * @property {number|Long|null} [reporterId] Reporter reporterId\n * @property {Array.|null} [tags] Reporter tags\n */\n\n /**\n * Constructs a new Reporter.\n * @memberof lightstep.collector\n * @classdesc Represents a Reporter.\n * @implements IReporter\n * @constructor\n * @param {lightstep.collector.IReporter=} [properties] Properties to set\n */\n function Reporter(properties) {\n this.tags = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Reporter reporterId.\n * @member {number|Long} reporterId\n * @memberof lightstep.collector.Reporter\n * @instance\n */\n Reporter.prototype.reporterId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * Reporter tags.\n * @member {Array.} tags\n * @memberof lightstep.collector.Reporter\n * @instance\n */\n Reporter.prototype.tags = $util.emptyArray;\n\n /**\n * Creates a new Reporter instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {lightstep.collector.IReporter=} [properties] Properties to set\n * @returns {lightstep.collector.Reporter} Reporter instance\n */\n Reporter.create = function create(properties) {\n return new Reporter(properties);\n };\n\n /**\n * Encodes the specified Reporter message. Does not implicitly {@link lightstep.collector.Reporter.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {lightstep.collector.IReporter} message Reporter message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reporter.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.reporterId != null && message.hasOwnProperty('reporterId'))\n writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.reporterId);\n if (message.tags != null && message.tags.length)\n for (let i = 0; i < message.tags.length; ++i)\n $root.lightstep.collector.KeyValue.encode(message.tags[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Reporter message, length delimited. Does not implicitly {@link lightstep.collector.Reporter.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {lightstep.collector.IReporter} message Reporter message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Reporter.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Reporter message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Reporter} Reporter\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reporter.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Reporter();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.reporterId = reader.uint64();\n break;\n case 4:\n if (!(message.tags && message.tags.length))\n message.tags = [];\n message.tags.push($root.lightstep.collector.KeyValue.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Reporter message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Reporter} Reporter\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Reporter.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Reporter message.\n * @function verify\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Reporter.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.reporterId != null && message.hasOwnProperty('reporterId'))\n if (!$util.isInteger(message.reporterId) && !(message.reporterId && $util.isInteger(message.reporterId.low) && $util.isInteger(message.reporterId.high)))\n return 'reporterId: integer|Long expected';\n if (message.tags != null && message.hasOwnProperty('tags')) {\n if (!Array.isArray(message.tags))\n return 'tags: array expected';\n for (let i = 0; i < message.tags.length; ++i) {\n let error = $root.lightstep.collector.KeyValue.verify(message.tags[i]);\n if (error)\n return 'tags.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a Reporter message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Reporter} Reporter\n */\n Reporter.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Reporter)\n return object;\n let message = new $root.lightstep.collector.Reporter();\n if (object.reporterId != null)\n if ($util.Long)\n (message.reporterId = $util.Long.fromValue(object.reporterId)).unsigned = true;\n else if (typeof object.reporterId === 'string')\n message.reporterId = parseInt(object.reporterId, 10);\n else if (typeof object.reporterId === 'number')\n message.reporterId = object.reporterId;\n else if (typeof object.reporterId === 'object')\n message.reporterId = new $util.LongBits(object.reporterId.low >>> 0, object.reporterId.high >>> 0).toNumber(true);\n if (object.tags) {\n if (!Array.isArray(object.tags))\n throw TypeError('.lightstep.collector.Reporter.tags: array expected');\n message.tags = [];\n for (let i = 0; i < object.tags.length; ++i) {\n if (typeof object.tags[i] !== 'object')\n throw TypeError('.lightstep.collector.Reporter.tags: object expected');\n message.tags[i] = $root.lightstep.collector.KeyValue.fromObject(object.tags[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Reporter message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Reporter\n * @static\n * @param {lightstep.collector.Reporter} message Reporter\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Reporter.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.tags = [];\n if (options.defaults)\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.reporterId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.reporterId = options.longs === String ? '0' : 0;\n if (message.reporterId != null && message.hasOwnProperty('reporterId'))\n if (typeof message.reporterId === 'number')\n object.reporterId = options.longs === String ? String(message.reporterId) : message.reporterId;\n else\n object.reporterId = options.longs === String ? $util.Long.prototype.toString.call(message.reporterId) : options.longs === Number ? new $util.LongBits(message.reporterId.low >>> 0, message.reporterId.high >>> 0).toNumber(true) : message.reporterId;\n if (message.tags && message.tags.length) {\n object.tags = [];\n for (let j = 0; j < message.tags.length; ++j)\n object.tags[j] = $root.lightstep.collector.KeyValue.toObject(message.tags[j], options);\n }\n return object;\n };\n\n /**\n * Converts this Reporter to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Reporter\n * @instance\n * @returns {Object.} JSON object\n */\n Reporter.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Reporter;\n })();\n\n collector.MetricsSample = (function () {\n\n /**\n * Properties of a MetricsSample.\n * @memberof lightstep.collector\n * @interface IMetricsSample\n * @property {string|null} [name] MetricsSample name\n * @property {number|Long|null} [intValue] MetricsSample intValue\n * @property {number|null} [doubleValue] MetricsSample doubleValue\n */\n\n /**\n * Constructs a new MetricsSample.\n * @memberof lightstep.collector\n * @classdesc Represents a MetricsSample.\n * @implements IMetricsSample\n * @constructor\n * @param {lightstep.collector.IMetricsSample=} [properties] Properties to set\n */\n function MetricsSample(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * MetricsSample name.\n * @member {string} name\n * @memberof lightstep.collector.MetricsSample\n * @instance\n */\n MetricsSample.prototype.name = '';\n\n /**\n * MetricsSample intValue.\n * @member {number|Long} intValue\n * @memberof lightstep.collector.MetricsSample\n * @instance\n */\n MetricsSample.prototype.intValue = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * MetricsSample doubleValue.\n * @member {number} doubleValue\n * @memberof lightstep.collector.MetricsSample\n * @instance\n */\n MetricsSample.prototype.doubleValue = 0;\n\n // OneOf field names bound to virtual getters and setters\n let $oneOfFields;\n\n /**\n * MetricsSample value.\n * @member {\"intValue\"|\"doubleValue\"|undefined} value\n * @memberof lightstep.collector.MetricsSample\n * @instance\n */\n Object.defineProperty(MetricsSample.prototype, 'value', {\n get: $util.oneOfGetter($oneOfFields = ['intValue', 'doubleValue']),\n set: $util.oneOfSetter($oneOfFields)\n });\n\n /**\n * Creates a new MetricsSample instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {lightstep.collector.IMetricsSample=} [properties] Properties to set\n * @returns {lightstep.collector.MetricsSample} MetricsSample instance\n */\n MetricsSample.create = function create(properties) {\n return new MetricsSample(properties);\n };\n\n /**\n * Encodes the specified MetricsSample message. Does not implicitly {@link lightstep.collector.MetricsSample.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {lightstep.collector.IMetricsSample} message MetricsSample message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MetricsSample.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.intValue != null && message.hasOwnProperty('intValue'))\n writer.uint32(/* id 2, wireType 0 =*/16).int64(message.intValue);\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue'))\n writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue);\n return writer;\n };\n\n /**\n * Encodes the specified MetricsSample message, length delimited. Does not implicitly {@link lightstep.collector.MetricsSample.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {lightstep.collector.IMetricsSample} message MetricsSample message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MetricsSample.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a MetricsSample message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.MetricsSample} MetricsSample\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MetricsSample.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.MetricsSample();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.intValue = reader.int64();\n break;\n case 3:\n message.doubleValue = reader.double();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a MetricsSample message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.MetricsSample} MetricsSample\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MetricsSample.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a MetricsSample message.\n * @function verify\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n MetricsSample.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n let properties = {};\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.intValue != null && message.hasOwnProperty('intValue')) {\n properties.value = 1;\n if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high)))\n return 'intValue: integer|Long expected';\n }\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue')) {\n if (properties.value === 1)\n return 'value: multiple values';\n properties.value = 1;\n if (typeof message.doubleValue !== 'number')\n return 'doubleValue: number expected';\n }\n return null;\n };\n\n /**\n * Creates a MetricsSample message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.MetricsSample} MetricsSample\n */\n MetricsSample.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.MetricsSample)\n return object;\n let message = new $root.lightstep.collector.MetricsSample();\n if (object.name != null)\n message.name = String(object.name);\n if (object.intValue != null)\n if ($util.Long)\n (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false;\n else if (typeof object.intValue === 'string')\n message.intValue = parseInt(object.intValue, 10);\n else if (typeof object.intValue === 'number')\n message.intValue = object.intValue;\n else if (typeof object.intValue === 'object')\n message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber();\n if (object.doubleValue != null)\n message.doubleValue = Number(object.doubleValue);\n return message;\n };\n\n /**\n * Creates a plain object from a MetricsSample message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.MetricsSample\n * @static\n * @param {lightstep.collector.MetricsSample} message MetricsSample\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n MetricsSample.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults)\n object.name = '';\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.intValue != null && message.hasOwnProperty('intValue')) {\n if (typeof message.intValue === 'number')\n object.intValue = options.longs === String ? String(message.intValue) : message.intValue;\n else\n object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue;\n if (options.oneofs)\n object.value = 'intValue';\n }\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue')) {\n object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;\n if (options.oneofs)\n object.value = 'doubleValue';\n }\n return object;\n };\n\n /**\n * Converts this MetricsSample to JSON.\n * @function toJSON\n * @memberof lightstep.collector.MetricsSample\n * @instance\n * @returns {Object.} JSON object\n */\n MetricsSample.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return MetricsSample;\n })();\n\n collector.InternalMetrics = (function () {\n\n /**\n * Properties of an InternalMetrics.\n * @memberof lightstep.collector\n * @interface IInternalMetrics\n * @property {google.protobuf.ITimestamp|null} [startTimestamp] InternalMetrics startTimestamp\n * @property {number|Long|null} [durationMicros] InternalMetrics durationMicros\n * @property {Array.|null} [logs] InternalMetrics logs\n * @property {Array.|null} [counts] InternalMetrics counts\n * @property {Array.|null} [gauges] InternalMetrics gauges\n */\n\n /**\n * Constructs a new InternalMetrics.\n * @memberof lightstep.collector\n * @classdesc Represents an InternalMetrics.\n * @implements IInternalMetrics\n * @constructor\n * @param {lightstep.collector.IInternalMetrics=} [properties] Properties to set\n */\n function InternalMetrics(properties) {\n this.logs = [];\n this.counts = [];\n this.gauges = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * InternalMetrics startTimestamp.\n * @member {google.protobuf.ITimestamp|null|undefined} startTimestamp\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n */\n InternalMetrics.prototype.startTimestamp = null;\n\n /**\n * InternalMetrics durationMicros.\n * @member {number|Long} durationMicros\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n */\n InternalMetrics.prototype.durationMicros = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * InternalMetrics logs.\n * @member {Array.} logs\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n */\n InternalMetrics.prototype.logs = $util.emptyArray;\n\n /**\n * InternalMetrics counts.\n * @member {Array.} counts\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n */\n InternalMetrics.prototype.counts = $util.emptyArray;\n\n /**\n * InternalMetrics gauges.\n * @member {Array.} gauges\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n */\n InternalMetrics.prototype.gauges = $util.emptyArray;\n\n /**\n * Creates a new InternalMetrics instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {lightstep.collector.IInternalMetrics=} [properties] Properties to set\n * @returns {lightstep.collector.InternalMetrics} InternalMetrics instance\n */\n InternalMetrics.create = function create(properties) {\n return new InternalMetrics(properties);\n };\n\n /**\n * Encodes the specified InternalMetrics message. Does not implicitly {@link lightstep.collector.InternalMetrics.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {lightstep.collector.IInternalMetrics} message InternalMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n InternalMetrics.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp'))\n $root.google.protobuf.Timestamp.encode(message.startTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.durationMicros);\n if (message.logs != null && message.logs.length)\n for (let i = 0; i < message.logs.length; ++i)\n $root.lightstep.collector.Log.encode(message.logs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n if (message.counts != null && message.counts.length)\n for (let i = 0; i < message.counts.length; ++i)\n $root.lightstep.collector.MetricsSample.encode(message.counts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.gauges != null && message.gauges.length)\n for (let i = 0; i < message.gauges.length; ++i)\n $root.lightstep.collector.MetricsSample.encode(message.gauges[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified InternalMetrics message, length delimited. Does not implicitly {@link lightstep.collector.InternalMetrics.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {lightstep.collector.IInternalMetrics} message InternalMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n InternalMetrics.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an InternalMetrics message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.InternalMetrics} InternalMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n InternalMetrics.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.InternalMetrics();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.startTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());\n break;\n case 2:\n message.durationMicros = reader.uint64();\n break;\n case 3:\n if (!(message.logs && message.logs.length))\n message.logs = [];\n message.logs.push($root.lightstep.collector.Log.decode(reader, reader.uint32()));\n break;\n case 4:\n if (!(message.counts && message.counts.length))\n message.counts = [];\n message.counts.push($root.lightstep.collector.MetricsSample.decode(reader, reader.uint32()));\n break;\n case 5:\n if (!(message.gauges && message.gauges.length))\n message.gauges = [];\n message.gauges.push($root.lightstep.collector.MetricsSample.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an InternalMetrics message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.InternalMetrics} InternalMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n InternalMetrics.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an InternalMetrics message.\n * @function verify\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n InternalMetrics.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp')) {\n let error = $root.google.protobuf.Timestamp.verify(message.startTimestamp);\n if (error)\n return 'startTimestamp.' + error;\n }\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n if (!$util.isInteger(message.durationMicros) && !(message.durationMicros && $util.isInteger(message.durationMicros.low) && $util.isInteger(message.durationMicros.high)))\n return 'durationMicros: integer|Long expected';\n if (message.logs != null && message.hasOwnProperty('logs')) {\n if (!Array.isArray(message.logs))\n return 'logs: array expected';\n for (let i = 0; i < message.logs.length; ++i) {\n let error = $root.lightstep.collector.Log.verify(message.logs[i]);\n if (error)\n return 'logs.' + error;\n }\n }\n if (message.counts != null && message.hasOwnProperty('counts')) {\n if (!Array.isArray(message.counts))\n return 'counts: array expected';\n for (let i = 0; i < message.counts.length; ++i) {\n let error = $root.lightstep.collector.MetricsSample.verify(message.counts[i]);\n if (error)\n return 'counts.' + error;\n }\n }\n if (message.gauges != null && message.hasOwnProperty('gauges')) {\n if (!Array.isArray(message.gauges))\n return 'gauges: array expected';\n for (let i = 0; i < message.gauges.length; ++i) {\n let error = $root.lightstep.collector.MetricsSample.verify(message.gauges[i]);\n if (error)\n return 'gauges.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates an InternalMetrics message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.InternalMetrics} InternalMetrics\n */\n InternalMetrics.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.InternalMetrics)\n return object;\n let message = new $root.lightstep.collector.InternalMetrics();\n if (object.startTimestamp != null) {\n if (typeof object.startTimestamp !== 'object')\n throw TypeError('.lightstep.collector.InternalMetrics.startTimestamp: object expected');\n message.startTimestamp = $root.google.protobuf.Timestamp.fromObject(object.startTimestamp);\n }\n if (object.durationMicros != null)\n if ($util.Long)\n (message.durationMicros = $util.Long.fromValue(object.durationMicros)).unsigned = true;\n else if (typeof object.durationMicros === 'string')\n message.durationMicros = parseInt(object.durationMicros, 10);\n else if (typeof object.durationMicros === 'number')\n message.durationMicros = object.durationMicros;\n else if (typeof object.durationMicros === 'object')\n message.durationMicros = new $util.LongBits(object.durationMicros.low >>> 0, object.durationMicros.high >>> 0).toNumber(true);\n if (object.logs) {\n if (!Array.isArray(object.logs))\n throw TypeError('.lightstep.collector.InternalMetrics.logs: array expected');\n message.logs = [];\n for (let i = 0; i < object.logs.length; ++i) {\n if (typeof object.logs[i] !== 'object')\n throw TypeError('.lightstep.collector.InternalMetrics.logs: object expected');\n message.logs[i] = $root.lightstep.collector.Log.fromObject(object.logs[i]);\n }\n }\n if (object.counts) {\n if (!Array.isArray(object.counts))\n throw TypeError('.lightstep.collector.InternalMetrics.counts: array expected');\n message.counts = [];\n for (let i = 0; i < object.counts.length; ++i) {\n if (typeof object.counts[i] !== 'object')\n throw TypeError('.lightstep.collector.InternalMetrics.counts: object expected');\n message.counts[i] = $root.lightstep.collector.MetricsSample.fromObject(object.counts[i]);\n }\n }\n if (object.gauges) {\n if (!Array.isArray(object.gauges))\n throw TypeError('.lightstep.collector.InternalMetrics.gauges: array expected');\n message.gauges = [];\n for (let i = 0; i < object.gauges.length; ++i) {\n if (typeof object.gauges[i] !== 'object')\n throw TypeError('.lightstep.collector.InternalMetrics.gauges: object expected');\n message.gauges[i] = $root.lightstep.collector.MetricsSample.fromObject(object.gauges[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from an InternalMetrics message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.InternalMetrics\n * @static\n * @param {lightstep.collector.InternalMetrics} message InternalMetrics\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n InternalMetrics.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.logs = [];\n object.counts = [];\n object.gauges = [];\n }\n if (options.defaults) {\n object.startTimestamp = null;\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.durationMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.durationMicros = options.longs === String ? '0' : 0;\n }\n if (message.startTimestamp != null && message.hasOwnProperty('startTimestamp'))\n object.startTimestamp = $root.google.protobuf.Timestamp.toObject(message.startTimestamp, options);\n if (message.durationMicros != null && message.hasOwnProperty('durationMicros'))\n if (typeof message.durationMicros === 'number')\n object.durationMicros = options.longs === String ? String(message.durationMicros) : message.durationMicros;\n else\n object.durationMicros = options.longs === String ? $util.Long.prototype.toString.call(message.durationMicros) : options.longs === Number ? new $util.LongBits(message.durationMicros.low >>> 0, message.durationMicros.high >>> 0).toNumber(true) : message.durationMicros;\n if (message.logs && message.logs.length) {\n object.logs = [];\n for (let j = 0; j < message.logs.length; ++j)\n object.logs[j] = $root.lightstep.collector.Log.toObject(message.logs[j], options);\n }\n if (message.counts && message.counts.length) {\n object.counts = [];\n for (let j = 0; j < message.counts.length; ++j)\n object.counts[j] = $root.lightstep.collector.MetricsSample.toObject(message.counts[j], options);\n }\n if (message.gauges && message.gauges.length) {\n object.gauges = [];\n for (let j = 0; j < message.gauges.length; ++j)\n object.gauges[j] = $root.lightstep.collector.MetricsSample.toObject(message.gauges[j], options);\n }\n return object;\n };\n\n /**\n * Converts this InternalMetrics to JSON.\n * @function toJSON\n * @memberof lightstep.collector.InternalMetrics\n * @instance\n * @returns {Object.} JSON object\n */\n InternalMetrics.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return InternalMetrics;\n })();\n\n collector.Auth = (function () {\n\n /**\n * Properties of an Auth.\n * @memberof lightstep.collector\n * @interface IAuth\n * @property {string|null} [accessToken] Auth accessToken\n */\n\n /**\n * Constructs a new Auth.\n * @memberof lightstep.collector\n * @classdesc Represents an Auth.\n * @implements IAuth\n * @constructor\n * @param {lightstep.collector.IAuth=} [properties] Properties to set\n */\n function Auth(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Auth accessToken.\n * @member {string} accessToken\n * @memberof lightstep.collector.Auth\n * @instance\n */\n Auth.prototype.accessToken = '';\n\n /**\n * Creates a new Auth instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Auth\n * @static\n * @param {lightstep.collector.IAuth=} [properties] Properties to set\n * @returns {lightstep.collector.Auth} Auth instance\n */\n Auth.create = function create(properties) {\n return new Auth(properties);\n };\n\n /**\n * Encodes the specified Auth message. Does not implicitly {@link lightstep.collector.Auth.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Auth\n * @static\n * @param {lightstep.collector.IAuth} message Auth message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Auth.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.accessToken != null && message.hasOwnProperty('accessToken'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.accessToken);\n return writer;\n };\n\n /**\n * Encodes the specified Auth message, length delimited. Does not implicitly {@link lightstep.collector.Auth.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Auth\n * @static\n * @param {lightstep.collector.IAuth} message Auth message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Auth.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Auth message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Auth\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Auth} Auth\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Auth.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Auth();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.accessToken = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Auth message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Auth\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Auth} Auth\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Auth.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Auth message.\n * @function verify\n * @memberof lightstep.collector.Auth\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Auth.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.accessToken != null && message.hasOwnProperty('accessToken'))\n if (!$util.isString(message.accessToken))\n return 'accessToken: string expected';\n return null;\n };\n\n /**\n * Creates an Auth message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Auth\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Auth} Auth\n */\n Auth.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Auth)\n return object;\n let message = new $root.lightstep.collector.Auth();\n if (object.accessToken != null)\n message.accessToken = String(object.accessToken);\n return message;\n };\n\n /**\n * Creates a plain object from an Auth message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Auth\n * @static\n * @param {lightstep.collector.Auth} message Auth\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Auth.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults)\n object.accessToken = '';\n if (message.accessToken != null && message.hasOwnProperty('accessToken'))\n object.accessToken = message.accessToken;\n return object;\n };\n\n /**\n * Converts this Auth to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Auth\n * @instance\n * @returns {Object.} JSON object\n */\n Auth.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Auth;\n })();\n\n collector.ReportRequest = (function () {\n\n /**\n * Properties of a ReportRequest.\n * @memberof lightstep.collector\n * @interface IReportRequest\n * @property {lightstep.collector.IReporter|null} [reporter] ReportRequest reporter\n * @property {lightstep.collector.IAuth|null} [auth] ReportRequest auth\n * @property {Array.|null} [spans] ReportRequest spans\n * @property {number|Long|null} [timestampOffsetMicros] ReportRequest timestampOffsetMicros\n * @property {lightstep.collector.IInternalMetrics|null} [internalMetrics] ReportRequest internalMetrics\n */\n\n /**\n * Constructs a new ReportRequest.\n * @memberof lightstep.collector\n * @classdesc Represents a ReportRequest.\n * @implements IReportRequest\n * @constructor\n * @param {lightstep.collector.IReportRequest=} [properties] Properties to set\n */\n function ReportRequest(properties) {\n this.spans = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ReportRequest reporter.\n * @member {lightstep.collector.IReporter|null|undefined} reporter\n * @memberof lightstep.collector.ReportRequest\n * @instance\n */\n ReportRequest.prototype.reporter = null;\n\n /**\n * ReportRequest auth.\n * @member {lightstep.collector.IAuth|null|undefined} auth\n * @memberof lightstep.collector.ReportRequest\n * @instance\n */\n ReportRequest.prototype.auth = null;\n\n /**\n * ReportRequest spans.\n * @member {Array.} spans\n * @memberof lightstep.collector.ReportRequest\n * @instance\n */\n ReportRequest.prototype.spans = $util.emptyArray;\n\n /**\n * ReportRequest timestampOffsetMicros.\n * @member {number|Long} timestampOffsetMicros\n * @memberof lightstep.collector.ReportRequest\n * @instance\n */\n ReportRequest.prototype.timestampOffsetMicros = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * ReportRequest internalMetrics.\n * @member {lightstep.collector.IInternalMetrics|null|undefined} internalMetrics\n * @memberof lightstep.collector.ReportRequest\n * @instance\n */\n ReportRequest.prototype.internalMetrics = null;\n\n /**\n * Creates a new ReportRequest instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {lightstep.collector.IReportRequest=} [properties] Properties to set\n * @returns {lightstep.collector.ReportRequest} ReportRequest instance\n */\n ReportRequest.create = function create(properties) {\n return new ReportRequest(properties);\n };\n\n /**\n * Encodes the specified ReportRequest message. Does not implicitly {@link lightstep.collector.ReportRequest.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {lightstep.collector.IReportRequest} message ReportRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReportRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.reporter != null && message.hasOwnProperty('reporter'))\n $root.lightstep.collector.Reporter.encode(message.reporter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.auth != null && message.hasOwnProperty('auth'))\n $root.lightstep.collector.Auth.encode(message.auth, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.spans != null && message.spans.length)\n for (let i = 0; i < message.spans.length; ++i)\n $root.lightstep.collector.Span.encode(message.spans[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n if (message.timestampOffsetMicros != null && message.hasOwnProperty('timestampOffsetMicros'))\n writer.uint32(/* id 5, wireType 0 =*/40).int64(message.timestampOffsetMicros);\n if (message.internalMetrics != null && message.hasOwnProperty('internalMetrics'))\n $root.lightstep.collector.InternalMetrics.encode(message.internalMetrics, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified ReportRequest message, length delimited. Does not implicitly {@link lightstep.collector.ReportRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {lightstep.collector.IReportRequest} message ReportRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReportRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ReportRequest message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.ReportRequest} ReportRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReportRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.ReportRequest();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.reporter = $root.lightstep.collector.Reporter.decode(reader, reader.uint32());\n break;\n case 2:\n message.auth = $root.lightstep.collector.Auth.decode(reader, reader.uint32());\n break;\n case 3:\n if (!(message.spans && message.spans.length))\n message.spans = [];\n message.spans.push($root.lightstep.collector.Span.decode(reader, reader.uint32()));\n break;\n case 5:\n message.timestampOffsetMicros = reader.int64();\n break;\n case 6:\n message.internalMetrics = $root.lightstep.collector.InternalMetrics.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ReportRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.ReportRequest} ReportRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReportRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ReportRequest message.\n * @function verify\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ReportRequest.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.reporter != null && message.hasOwnProperty('reporter')) {\n let error = $root.lightstep.collector.Reporter.verify(message.reporter);\n if (error)\n return 'reporter.' + error;\n }\n if (message.auth != null && message.hasOwnProperty('auth')) {\n let error = $root.lightstep.collector.Auth.verify(message.auth);\n if (error)\n return 'auth.' + error;\n }\n if (message.spans != null && message.hasOwnProperty('spans')) {\n if (!Array.isArray(message.spans))\n return 'spans: array expected';\n for (let i = 0; i < message.spans.length; ++i) {\n let error = $root.lightstep.collector.Span.verify(message.spans[i]);\n if (error)\n return 'spans.' + error;\n }\n }\n if (message.timestampOffsetMicros != null && message.hasOwnProperty('timestampOffsetMicros'))\n if (!$util.isInteger(message.timestampOffsetMicros) && !(message.timestampOffsetMicros && $util.isInteger(message.timestampOffsetMicros.low) && $util.isInteger(message.timestampOffsetMicros.high)))\n return 'timestampOffsetMicros: integer|Long expected';\n if (message.internalMetrics != null && message.hasOwnProperty('internalMetrics')) {\n let error = $root.lightstep.collector.InternalMetrics.verify(message.internalMetrics);\n if (error)\n return 'internalMetrics.' + error;\n }\n return null;\n };\n\n /**\n * Creates a ReportRequest message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.ReportRequest} ReportRequest\n */\n ReportRequest.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.ReportRequest)\n return object;\n let message = new $root.lightstep.collector.ReportRequest();\n if (object.reporter != null) {\n if (typeof object.reporter !== 'object')\n throw TypeError('.lightstep.collector.ReportRequest.reporter: object expected');\n message.reporter = $root.lightstep.collector.Reporter.fromObject(object.reporter);\n }\n if (object.auth != null) {\n if (typeof object.auth !== 'object')\n throw TypeError('.lightstep.collector.ReportRequest.auth: object expected');\n message.auth = $root.lightstep.collector.Auth.fromObject(object.auth);\n }\n if (object.spans) {\n if (!Array.isArray(object.spans))\n throw TypeError('.lightstep.collector.ReportRequest.spans: array expected');\n message.spans = [];\n for (let i = 0; i < object.spans.length; ++i) {\n if (typeof object.spans[i] !== 'object')\n throw TypeError('.lightstep.collector.ReportRequest.spans: object expected');\n message.spans[i] = $root.lightstep.collector.Span.fromObject(object.spans[i]);\n }\n }\n if (object.timestampOffsetMicros != null)\n if ($util.Long)\n (message.timestampOffsetMicros = $util.Long.fromValue(object.timestampOffsetMicros)).unsigned = false;\n else if (typeof object.timestampOffsetMicros === 'string')\n message.timestampOffsetMicros = parseInt(object.timestampOffsetMicros, 10);\n else if (typeof object.timestampOffsetMicros === 'number')\n message.timestampOffsetMicros = object.timestampOffsetMicros;\n else if (typeof object.timestampOffsetMicros === 'object')\n message.timestampOffsetMicros = new $util.LongBits(object.timestampOffsetMicros.low >>> 0, object.timestampOffsetMicros.high >>> 0).toNumber();\n if (object.internalMetrics != null) {\n if (typeof object.internalMetrics !== 'object')\n throw TypeError('.lightstep.collector.ReportRequest.internalMetrics: object expected');\n message.internalMetrics = $root.lightstep.collector.InternalMetrics.fromObject(object.internalMetrics);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a ReportRequest message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.ReportRequest\n * @static\n * @param {lightstep.collector.ReportRequest} message ReportRequest\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ReportRequest.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.spans = [];\n if (options.defaults) {\n object.reporter = null;\n object.auth = null;\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.timestampOffsetMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.timestampOffsetMicros = options.longs === String ? '0' : 0;\n object.internalMetrics = null;\n }\n if (message.reporter != null && message.hasOwnProperty('reporter'))\n object.reporter = $root.lightstep.collector.Reporter.toObject(message.reporter, options);\n if (message.auth != null && message.hasOwnProperty('auth'))\n object.auth = $root.lightstep.collector.Auth.toObject(message.auth, options);\n if (message.spans && message.spans.length) {\n object.spans = [];\n for (let j = 0; j < message.spans.length; ++j)\n object.spans[j] = $root.lightstep.collector.Span.toObject(message.spans[j], options);\n }\n if (message.timestampOffsetMicros != null && message.hasOwnProperty('timestampOffsetMicros'))\n if (typeof message.timestampOffsetMicros === 'number')\n object.timestampOffsetMicros = options.longs === String ? String(message.timestampOffsetMicros) : message.timestampOffsetMicros;\n else\n object.timestampOffsetMicros = options.longs === String ? $util.Long.prototype.toString.call(message.timestampOffsetMicros) : options.longs === Number ? new $util.LongBits(message.timestampOffsetMicros.low >>> 0, message.timestampOffsetMicros.high >>> 0).toNumber() : message.timestampOffsetMicros;\n if (message.internalMetrics != null && message.hasOwnProperty('internalMetrics'))\n object.internalMetrics = $root.lightstep.collector.InternalMetrics.toObject(message.internalMetrics, options);\n return object;\n };\n\n /**\n * Converts this ReportRequest to JSON.\n * @function toJSON\n * @memberof lightstep.collector.ReportRequest\n * @instance\n * @returns {Object.} JSON object\n */\n ReportRequest.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ReportRequest;\n })();\n\n collector.Command = (function () {\n\n /**\n * Properties of a Command.\n * @memberof lightstep.collector\n * @interface ICommand\n * @property {boolean|null} [disable] Command disable\n */\n\n /**\n * Constructs a new Command.\n * @memberof lightstep.collector\n * @classdesc Represents a Command.\n * @implements ICommand\n * @constructor\n * @param {lightstep.collector.ICommand=} [properties] Properties to set\n */\n function Command(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Command disable.\n * @member {boolean} disable\n * @memberof lightstep.collector.Command\n * @instance\n */\n Command.prototype.disable = false;\n\n /**\n * Creates a new Command instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.Command\n * @static\n * @param {lightstep.collector.ICommand=} [properties] Properties to set\n * @returns {lightstep.collector.Command} Command instance\n */\n Command.create = function create(properties) {\n return new Command(properties);\n };\n\n /**\n * Encodes the specified Command message. Does not implicitly {@link lightstep.collector.Command.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.Command\n * @static\n * @param {lightstep.collector.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.disable != null && message.hasOwnProperty('disable'))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable);\n return writer;\n };\n\n /**\n * Encodes the specified Command message, length delimited. Does not implicitly {@link lightstep.collector.Command.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.Command\n * @static\n * @param {lightstep.collector.ICommand} message Command message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Command.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.Command();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.disable = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Command message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.Command\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.Command} Command\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Command.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Command message.\n * @function verify\n * @memberof lightstep.collector.Command\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Command.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.disable != null && message.hasOwnProperty('disable'))\n if (typeof message.disable !== 'boolean')\n return 'disable: boolean expected';\n return null;\n };\n\n /**\n * Creates a Command message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.Command\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.Command} Command\n */\n Command.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.Command)\n return object;\n let message = new $root.lightstep.collector.Command();\n if (object.disable != null)\n message.disable = Boolean(object.disable);\n return message;\n };\n\n /**\n * Creates a plain object from a Command message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.Command\n * @static\n * @param {lightstep.collector.Command} message Command\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Command.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults)\n object.disable = false;\n if (message.disable != null && message.hasOwnProperty('disable'))\n object.disable = message.disable;\n return object;\n };\n\n /**\n * Converts this Command to JSON.\n * @function toJSON\n * @memberof lightstep.collector.Command\n * @instance\n * @returns {Object.} JSON object\n */\n Command.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Command;\n })();\n\n collector.ReportResponse = (function () {\n\n /**\n * Properties of a ReportResponse.\n * @memberof lightstep.collector\n * @interface IReportResponse\n * @property {Array.|null} [commands] ReportResponse commands\n * @property {google.protobuf.ITimestamp|null} [receiveTimestamp] ReportResponse receiveTimestamp\n * @property {google.protobuf.ITimestamp|null} [transmitTimestamp] ReportResponse transmitTimestamp\n * @property {Array.|null} [errors] ReportResponse errors\n * @property {Array.|null} [warnings] ReportResponse warnings\n * @property {Array.|null} [infos] ReportResponse infos\n */\n\n /**\n * Constructs a new ReportResponse.\n * @memberof lightstep.collector\n * @classdesc Represents a ReportResponse.\n * @implements IReportResponse\n * @constructor\n * @param {lightstep.collector.IReportResponse=} [properties] Properties to set\n */\n function ReportResponse(properties) {\n this.commands = [];\n this.errors = [];\n this.warnings = [];\n this.infos = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ReportResponse commands.\n * @member {Array.} commands\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.commands = $util.emptyArray;\n\n /**\n * ReportResponse receiveTimestamp.\n * @member {google.protobuf.ITimestamp|null|undefined} receiveTimestamp\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.receiveTimestamp = null;\n\n /**\n * ReportResponse transmitTimestamp.\n * @member {google.protobuf.ITimestamp|null|undefined} transmitTimestamp\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.transmitTimestamp = null;\n\n /**\n * ReportResponse errors.\n * @member {Array.} errors\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.errors = $util.emptyArray;\n\n /**\n * ReportResponse warnings.\n * @member {Array.} warnings\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.warnings = $util.emptyArray;\n\n /**\n * ReportResponse infos.\n * @member {Array.} infos\n * @memberof lightstep.collector.ReportResponse\n * @instance\n */\n ReportResponse.prototype.infos = $util.emptyArray;\n\n /**\n * Creates a new ReportResponse instance using the specified properties.\n * @function create\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {lightstep.collector.IReportResponse=} [properties] Properties to set\n * @returns {lightstep.collector.ReportResponse} ReportResponse instance\n */\n ReportResponse.create = function create(properties) {\n return new ReportResponse(properties);\n };\n\n /**\n * Encodes the specified ReportResponse message. Does not implicitly {@link lightstep.collector.ReportResponse.verify|verify} messages.\n * @function encode\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {lightstep.collector.IReportResponse} message ReportResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReportResponse.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.commands != null && message.commands.length)\n for (let i = 0; i < message.commands.length; ++i)\n $root.lightstep.collector.Command.encode(message.commands[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n if (message.receiveTimestamp != null && message.hasOwnProperty('receiveTimestamp'))\n $root.google.protobuf.Timestamp.encode(message.receiveTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.transmitTimestamp != null && message.hasOwnProperty('transmitTimestamp'))\n $root.google.protobuf.Timestamp.encode(message.transmitTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n if (message.errors != null && message.errors.length)\n for (let i = 0; i < message.errors.length; ++i)\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.errors[i]);\n if (message.warnings != null && message.warnings.length)\n for (let i = 0; i < message.warnings.length; ++i)\n writer.uint32(/* id 5, wireType 2 =*/42).string(message.warnings[i]);\n if (message.infos != null && message.infos.length)\n for (let i = 0; i < message.infos.length; ++i)\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.infos[i]);\n return writer;\n };\n\n /**\n * Encodes the specified ReportResponse message, length delimited. Does not implicitly {@link lightstep.collector.ReportResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {lightstep.collector.IReportResponse} message ReportResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReportResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ReportResponse message from the specified reader or buffer.\n * @function decode\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {lightstep.collector.ReportResponse} ReportResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReportResponse.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lightstep.collector.ReportResponse();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.commands && message.commands.length))\n message.commands = [];\n message.commands.push($root.lightstep.collector.Command.decode(reader, reader.uint32()));\n break;\n case 2:\n message.receiveTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());\n break;\n case 3:\n message.transmitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());\n break;\n case 4:\n if (!(message.errors && message.errors.length))\n message.errors = [];\n message.errors.push(reader.string());\n break;\n case 5:\n if (!(message.warnings && message.warnings.length))\n message.warnings = [];\n message.warnings.push(reader.string());\n break;\n case 6:\n if (!(message.infos && message.infos.length))\n message.infos = [];\n message.infos.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ReportResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {lightstep.collector.ReportResponse} ReportResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReportResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ReportResponse message.\n * @function verify\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ReportResponse.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.commands != null && message.hasOwnProperty('commands')) {\n if (!Array.isArray(message.commands))\n return 'commands: array expected';\n for (let i = 0; i < message.commands.length; ++i) {\n let error = $root.lightstep.collector.Command.verify(message.commands[i]);\n if (error)\n return 'commands.' + error;\n }\n }\n if (message.receiveTimestamp != null && message.hasOwnProperty('receiveTimestamp')) {\n let error = $root.google.protobuf.Timestamp.verify(message.receiveTimestamp);\n if (error)\n return 'receiveTimestamp.' + error;\n }\n if (message.transmitTimestamp != null && message.hasOwnProperty('transmitTimestamp')) {\n let error = $root.google.protobuf.Timestamp.verify(message.transmitTimestamp);\n if (error)\n return 'transmitTimestamp.' + error;\n }\n if (message.errors != null && message.hasOwnProperty('errors')) {\n if (!Array.isArray(message.errors))\n return 'errors: array expected';\n for (let i = 0; i < message.errors.length; ++i)\n if (!$util.isString(message.errors[i]))\n return 'errors: string[] expected';\n }\n if (message.warnings != null && message.hasOwnProperty('warnings')) {\n if (!Array.isArray(message.warnings))\n return 'warnings: array expected';\n for (let i = 0; i < message.warnings.length; ++i)\n if (!$util.isString(message.warnings[i]))\n return 'warnings: string[] expected';\n }\n if (message.infos != null && message.hasOwnProperty('infos')) {\n if (!Array.isArray(message.infos))\n return 'infos: array expected';\n for (let i = 0; i < message.infos.length; ++i)\n if (!$util.isString(message.infos[i]))\n return 'infos: string[] expected';\n }\n return null;\n };\n\n /**\n * Creates a ReportResponse message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {Object.} object Plain object\n * @returns {lightstep.collector.ReportResponse} ReportResponse\n */\n ReportResponse.fromObject = function fromObject(object) {\n if (object instanceof $root.lightstep.collector.ReportResponse)\n return object;\n let message = new $root.lightstep.collector.ReportResponse();\n if (object.commands) {\n if (!Array.isArray(object.commands))\n throw TypeError('.lightstep.collector.ReportResponse.commands: array expected');\n message.commands = [];\n for (let i = 0; i < object.commands.length; ++i) {\n if (typeof object.commands[i] !== 'object')\n throw TypeError('.lightstep.collector.ReportResponse.commands: object expected');\n message.commands[i] = $root.lightstep.collector.Command.fromObject(object.commands[i]);\n }\n }\n if (object.receiveTimestamp != null) {\n if (typeof object.receiveTimestamp !== 'object')\n throw TypeError('.lightstep.collector.ReportResponse.receiveTimestamp: object expected');\n message.receiveTimestamp = $root.google.protobuf.Timestamp.fromObject(object.receiveTimestamp);\n }\n if (object.transmitTimestamp != null) {\n if (typeof object.transmitTimestamp !== 'object')\n throw TypeError('.lightstep.collector.ReportResponse.transmitTimestamp: object expected');\n message.transmitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.transmitTimestamp);\n }\n if (object.errors) {\n if (!Array.isArray(object.errors))\n throw TypeError('.lightstep.collector.ReportResponse.errors: array expected');\n message.errors = [];\n for (let i = 0; i < object.errors.length; ++i)\n message.errors[i] = String(object.errors[i]);\n }\n if (object.warnings) {\n if (!Array.isArray(object.warnings))\n throw TypeError('.lightstep.collector.ReportResponse.warnings: array expected');\n message.warnings = [];\n for (let i = 0; i < object.warnings.length; ++i)\n message.warnings[i] = String(object.warnings[i]);\n }\n if (object.infos) {\n if (!Array.isArray(object.infos))\n throw TypeError('.lightstep.collector.ReportResponse.infos: array expected');\n message.infos = [];\n for (let i = 0; i < object.infos.length; ++i)\n message.infos[i] = String(object.infos[i]);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a ReportResponse message. Also converts values to other types if specified.\n * @function toObject\n * @memberof lightstep.collector.ReportResponse\n * @static\n * @param {lightstep.collector.ReportResponse} message ReportResponse\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ReportResponse.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.commands = [];\n object.errors = [];\n object.warnings = [];\n object.infos = [];\n }\n if (options.defaults) {\n object.receiveTimestamp = null;\n object.transmitTimestamp = null;\n }\n if (message.commands && message.commands.length) {\n object.commands = [];\n for (let j = 0; j < message.commands.length; ++j)\n object.commands[j] = $root.lightstep.collector.Command.toObject(message.commands[j], options);\n }\n if (message.receiveTimestamp != null && message.hasOwnProperty('receiveTimestamp'))\n object.receiveTimestamp = $root.google.protobuf.Timestamp.toObject(message.receiveTimestamp, options);\n if (message.transmitTimestamp != null && message.hasOwnProperty('transmitTimestamp'))\n object.transmitTimestamp = $root.google.protobuf.Timestamp.toObject(message.transmitTimestamp, options);\n if (message.errors && message.errors.length) {\n object.errors = [];\n for (let j = 0; j < message.errors.length; ++j)\n object.errors[j] = message.errors[j];\n }\n if (message.warnings && message.warnings.length) {\n object.warnings = [];\n for (let j = 0; j < message.warnings.length; ++j)\n object.warnings[j] = message.warnings[j];\n }\n if (message.infos && message.infos.length) {\n object.infos = [];\n for (let j = 0; j < message.infos.length; ++j)\n object.infos[j] = message.infos[j];\n }\n return object;\n };\n\n /**\n * Converts this ReportResponse to JSON.\n * @function toJSON\n * @memberof lightstep.collector.ReportResponse\n * @instance\n * @returns {Object.} JSON object\n */\n ReportResponse.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ReportResponse;\n })();\n\n collector.CollectorService = (function () {\n\n /**\n * Constructs a new CollectorService service.\n * @memberof lightstep.collector\n * @classdesc Represents a CollectorService\n * @extends $protobuf.rpc.Service\n * @constructor\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\n function CollectorService(rpcImpl, requestDelimited, responseDelimited) {\n $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);\n }\n\n (CollectorService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CollectorService;\n\n /**\n * Creates new CollectorService service using the specified rpc implementation.\n * @function create\n * @memberof lightstep.collector.CollectorService\n * @static\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {CollectorService} RPC service. Useful where requests and/or responses are streamed.\n */\n CollectorService.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n return new this(rpcImpl, requestDelimited, responseDelimited);\n };\n\n /**\n * Callback as used by {@link lightstep.collector.CollectorService#report}.\n * @memberof lightstep.collector.CollectorService\n * @typedef ReportCallback\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {lightstep.collector.ReportResponse} [response] ReportResponse\n */\n\n /**\n * Calls Report.\n * @function report\n * @memberof lightstep.collector.CollectorService\n * @instance\n * @param {lightstep.collector.IReportRequest} request ReportRequest message or plain object\n * @param {lightstep.collector.CollectorService.ReportCallback} callback Node-style callback called with the error, if any, and ReportResponse\n * @returns {undefined}\n * @variation 1\n */\n Object.defineProperty(CollectorService.prototype.report = function report(request, callback) {\n return this.rpcCall(report, $root.lightstep.collector.ReportRequest, $root.lightstep.collector.ReportResponse, request, callback);\n }, 'name', { value: 'Report' });\n\n /**\n * Calls Report.\n * @function report\n * @memberof lightstep.collector.CollectorService\n * @instance\n * @param {lightstep.collector.IReportRequest} request ReportRequest message or plain object\n * @returns {Promise} Promise\n * @variation 2\n */\n\n return CollectorService;\n })();\n\n return collector;\n })();\n\n return lightstep;\n})();\n\nexport const google = $root.google = (() => {\n\n /**\n * Namespace google.\n * @exports google\n * @namespace\n */\n const google = {};\n\n google.protobuf = (function () {\n\n /**\n * Namespace protobuf.\n * @memberof google\n * @namespace\n */\n const protobuf = {};\n\n protobuf.Timestamp = (function () {\n\n /**\n * Properties of a Timestamp.\n * @memberof google.protobuf\n * @interface ITimestamp\n * @property {number|Long|null} [seconds] Timestamp seconds\n * @property {number|null} [nanos] Timestamp nanos\n */\n\n /**\n * Constructs a new Timestamp.\n * @memberof google.protobuf\n * @classdesc Represents a Timestamp.\n * @implements ITimestamp\n * @constructor\n * @param {google.protobuf.ITimestamp=} [properties] Properties to set\n */\n function Timestamp(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Timestamp seconds.\n * @member {number|Long} seconds\n * @memberof google.protobuf.Timestamp\n * @instance\n */\n Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * Timestamp nanos.\n * @member {number} nanos\n * @memberof google.protobuf.Timestamp\n * @instance\n */\n Timestamp.prototype.nanos = 0;\n\n /**\n * Creates a new Timestamp instance using the specified properties.\n * @function create\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {google.protobuf.ITimestamp=} [properties] Properties to set\n * @returns {google.protobuf.Timestamp} Timestamp instance\n */\n Timestamp.create = function create(properties) {\n return new Timestamp(properties);\n };\n\n /**\n * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Timestamp.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.seconds != null && message.hasOwnProperty('seconds'))\n writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);\n if (message.nanos != null && message.hasOwnProperty('nanos'))\n writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);\n return writer;\n };\n\n /**\n * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Timestamp.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Timestamp message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.Timestamp} Timestamp\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Timestamp.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.seconds = reader.int64();\n break;\n case 2:\n message.nanos = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Timestamp message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.Timestamp} Timestamp\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Timestamp.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Timestamp message.\n * @function verify\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Timestamp.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.seconds != null && message.hasOwnProperty('seconds'))\n if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))\n return 'seconds: integer|Long expected';\n if (message.nanos != null && message.hasOwnProperty('nanos'))\n if (!$util.isInteger(message.nanos))\n return 'nanos: integer expected';\n return null;\n };\n\n /**\n * Creates a Timestamp message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.Timestamp} Timestamp\n */\n Timestamp.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.Timestamp)\n return object;\n let message = new $root.google.protobuf.Timestamp();\n if (object.seconds != null)\n if ($util.Long)\n (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;\n else if (typeof object.seconds === 'string')\n message.seconds = parseInt(object.seconds, 10);\n else if (typeof object.seconds === 'number')\n message.seconds = object.seconds;\n else if (typeof object.seconds === 'object')\n message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();\n if (object.nanos != null)\n message.nanos = object.nanos | 0;\n return message;\n };\n\n /**\n * Creates a plain object from a Timestamp message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.Timestamp\n * @static\n * @param {google.protobuf.Timestamp} message Timestamp\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Timestamp.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.seconds = options.longs === String ? '0' : 0;\n object.nanos = 0;\n }\n if (message.seconds != null && message.hasOwnProperty('seconds'))\n if (typeof message.seconds === 'number')\n object.seconds = options.longs === String ? String(message.seconds) : message.seconds;\n else\n object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;\n if (message.nanos != null && message.hasOwnProperty('nanos'))\n object.nanos = message.nanos;\n return object;\n };\n\n /**\n * Converts this Timestamp to JSON.\n * @function toJSON\n * @memberof google.protobuf.Timestamp\n * @instance\n * @returns {Object.} JSON object\n */\n Timestamp.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Timestamp;\n })();\n\n protobuf.FileDescriptorSet = (function () {\n\n /**\n * Properties of a FileDescriptorSet.\n * @memberof google.protobuf\n * @interface IFileDescriptorSet\n * @property {Array.|null} [file] FileDescriptorSet file\n */\n\n /**\n * Constructs a new FileDescriptorSet.\n * @memberof google.protobuf\n * @classdesc Represents a FileDescriptorSet.\n * @implements IFileDescriptorSet\n * @constructor\n * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set\n */\n function FileDescriptorSet(properties) {\n this.file = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * FileDescriptorSet file.\n * @member {Array.} file\n * @memberof google.protobuf.FileDescriptorSet\n * @instance\n */\n FileDescriptorSet.prototype.file = $util.emptyArray;\n\n /**\n * Creates a new FileDescriptorSet instance using the specified properties.\n * @function create\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set\n * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance\n */\n FileDescriptorSet.create = function create(properties) {\n return new FileDescriptorSet(properties);\n };\n\n /**\n * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileDescriptorSet.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.file != null && message.file.length)\n for (let i = 0; i < message.file.length; ++i)\n $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FileDescriptorSet message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileDescriptorSet.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.file && message.file.length))\n message.file = [];\n message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a FileDescriptorSet message.\n * @function verify\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n FileDescriptorSet.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.file != null && message.hasOwnProperty('file')) {\n if (!Array.isArray(message.file))\n return 'file: array expected';\n for (let i = 0; i < message.file.length; ++i) {\n let error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);\n if (error)\n return 'file.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet\n */\n FileDescriptorSet.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.FileDescriptorSet)\n return object;\n let message = new $root.google.protobuf.FileDescriptorSet();\n if (object.file) {\n if (!Array.isArray(object.file))\n throw TypeError('.google.protobuf.FileDescriptorSet.file: array expected');\n message.file = [];\n for (let i = 0; i < object.file.length; ++i) {\n if (typeof object.file[i] !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorSet.file: object expected');\n message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.FileDescriptorSet\n * @static\n * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n FileDescriptorSet.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.file = [];\n if (message.file && message.file.length) {\n object.file = [];\n for (let j = 0; j < message.file.length; ++j)\n object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);\n }\n return object;\n };\n\n /**\n * Converts this FileDescriptorSet to JSON.\n * @function toJSON\n * @memberof google.protobuf.FileDescriptorSet\n * @instance\n * @returns {Object.} JSON object\n */\n FileDescriptorSet.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return FileDescriptorSet;\n })();\n\n protobuf.FileDescriptorProto = (function () {\n\n /**\n * Properties of a FileDescriptorProto.\n * @memberof google.protobuf\n * @interface IFileDescriptorProto\n * @property {string|null} [name] FileDescriptorProto name\n * @property {string|null} [\"package\"] FileDescriptorProto package\n * @property {Array.|null} [dependency] FileDescriptorProto dependency\n * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency\n * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency\n * @property {Array.|null} [messageType] FileDescriptorProto messageType\n * @property {Array.|null} [enumType] FileDescriptorProto enumType\n * @property {Array.|null} [service] FileDescriptorProto service\n * @property {Array.|null} [extension] FileDescriptorProto extension\n * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options\n * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo\n * @property {string|null} [syntax] FileDescriptorProto syntax\n */\n\n /**\n * Constructs a new FileDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents a FileDescriptorProto.\n * @implements IFileDescriptorProto\n * @constructor\n * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set\n */\n function FileDescriptorProto(properties) {\n this.dependency = [];\n this.publicDependency = [];\n this.weakDependency = [];\n this.messageType = [];\n this.enumType = [];\n this.service = [];\n this.extension = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * FileDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.name = '';\n\n /**\n * FileDescriptorProto package.\n * @member {string} package\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype['package'] = '';\n\n /**\n * FileDescriptorProto dependency.\n * @member {Array.} dependency\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.dependency = $util.emptyArray;\n\n /**\n * FileDescriptorProto publicDependency.\n * @member {Array.} publicDependency\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.publicDependency = $util.emptyArray;\n\n /**\n * FileDescriptorProto weakDependency.\n * @member {Array.} weakDependency\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.weakDependency = $util.emptyArray;\n\n /**\n * FileDescriptorProto messageType.\n * @member {Array.} messageType\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.messageType = $util.emptyArray;\n\n /**\n * FileDescriptorProto enumType.\n * @member {Array.} enumType\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.enumType = $util.emptyArray;\n\n /**\n * FileDescriptorProto service.\n * @member {Array.} service\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.service = $util.emptyArray;\n\n /**\n * FileDescriptorProto extension.\n * @member {Array.} extension\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.extension = $util.emptyArray;\n\n /**\n * FileDescriptorProto options.\n * @member {google.protobuf.IFileOptions|null|undefined} options\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.options = null;\n\n /**\n * FileDescriptorProto sourceCodeInfo.\n * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.sourceCodeInfo = null;\n\n /**\n * FileDescriptorProto syntax.\n * @member {string} syntax\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n */\n FileDescriptorProto.prototype.syntax = '';\n\n /**\n * Creates a new FileDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance\n */\n FileDescriptorProto.create = function create(properties) {\n return new FileDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message['package'] != null && message.hasOwnProperty('package'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message['package']);\n if (message.dependency != null && message.dependency.length)\n for (let i = 0; i < message.dependency.length; ++i)\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);\n if (message.messageType != null && message.messageType.length)\n for (let i = 0; i < message.messageType.length; ++i)\n $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.enumType != null && message.enumType.length)\n for (let i = 0; i < message.enumType.length; ++i)\n $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.service != null && message.service.length)\n for (let i = 0; i < message.service.length; ++i)\n $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.extension != null && message.extension.length)\n for (let i = 0; i < message.extension.length; ++i)\n $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.sourceCodeInfo != null && message.hasOwnProperty('sourceCodeInfo'))\n $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.publicDependency != null && message.publicDependency.length)\n for (let i = 0; i < message.publicDependency.length; ++i)\n writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);\n if (message.weakDependency != null && message.weakDependency.length)\n for (let i = 0; i < message.weakDependency.length; ++i)\n writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);\n if (message.syntax != null && message.hasOwnProperty('syntax'))\n writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);\n return writer;\n };\n\n /**\n * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FileDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message['package'] = reader.string();\n break;\n case 3:\n if (!(message.dependency && message.dependency.length))\n message.dependency = [];\n message.dependency.push(reader.string());\n break;\n case 10:\n if (!(message.publicDependency && message.publicDependency.length))\n message.publicDependency = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.publicDependency.push(reader.int32());\n } else\n message.publicDependency.push(reader.int32());\n break;\n case 11:\n if (!(message.weakDependency && message.weakDependency.length))\n message.weakDependency = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.weakDependency.push(reader.int32());\n } else\n message.weakDependency.push(reader.int32());\n break;\n case 4:\n if (!(message.messageType && message.messageType.length))\n message.messageType = [];\n message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));\n break;\n case 5:\n if (!(message.enumType && message.enumType.length))\n message.enumType = [];\n message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 6:\n if (!(message.service && message.service.length))\n message.service = [];\n message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 7:\n if (!(message.extension && message.extension.length))\n message.extension = [];\n message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 8:\n message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());\n break;\n case 9:\n message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());\n break;\n case 12:\n message.syntax = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a FileDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n FileDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message['package'] != null && message.hasOwnProperty('package'))\n if (!$util.isString(message['package']))\n return 'package: string expected';\n if (message.dependency != null && message.hasOwnProperty('dependency')) {\n if (!Array.isArray(message.dependency))\n return 'dependency: array expected';\n for (let i = 0; i < message.dependency.length; ++i)\n if (!$util.isString(message.dependency[i]))\n return 'dependency: string[] expected';\n }\n if (message.publicDependency != null && message.hasOwnProperty('publicDependency')) {\n if (!Array.isArray(message.publicDependency))\n return 'publicDependency: array expected';\n for (let i = 0; i < message.publicDependency.length; ++i)\n if (!$util.isInteger(message.publicDependency[i]))\n return 'publicDependency: integer[] expected';\n }\n if (message.weakDependency != null && message.hasOwnProperty('weakDependency')) {\n if (!Array.isArray(message.weakDependency))\n return 'weakDependency: array expected';\n for (let i = 0; i < message.weakDependency.length; ++i)\n if (!$util.isInteger(message.weakDependency[i]))\n return 'weakDependency: integer[] expected';\n }\n if (message.messageType != null && message.hasOwnProperty('messageType')) {\n if (!Array.isArray(message.messageType))\n return 'messageType: array expected';\n for (let i = 0; i < message.messageType.length; ++i) {\n let error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]);\n if (error)\n return 'messageType.' + error;\n }\n }\n if (message.enumType != null && message.hasOwnProperty('enumType')) {\n if (!Array.isArray(message.enumType))\n return 'enumType: array expected';\n for (let i = 0; i < message.enumType.length; ++i) {\n let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);\n if (error)\n return 'enumType.' + error;\n }\n }\n if (message.service != null && message.hasOwnProperty('service')) {\n if (!Array.isArray(message.service))\n return 'service: array expected';\n for (let i = 0; i < message.service.length; ++i) {\n let error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]);\n if (error)\n return 'service.' + error;\n }\n }\n if (message.extension != null && message.hasOwnProperty('extension')) {\n if (!Array.isArray(message.extension))\n return 'extension: array expected';\n for (let i = 0; i < message.extension.length; ++i) {\n let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);\n if (error)\n return 'extension.' + error;\n }\n }\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.FileOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n if (message.sourceCodeInfo != null && message.hasOwnProperty('sourceCodeInfo')) {\n let error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo);\n if (error)\n return 'sourceCodeInfo.' + error;\n }\n if (message.syntax != null && message.hasOwnProperty('syntax'))\n if (!$util.isString(message.syntax))\n return 'syntax: string expected';\n return null;\n };\n\n /**\n * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto\n */\n FileDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.FileDescriptorProto)\n return object;\n let message = new $root.google.protobuf.FileDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object['package'] != null)\n message['package'] = String(object['package']);\n if (object.dependency) {\n if (!Array.isArray(object.dependency))\n throw TypeError('.google.protobuf.FileDescriptorProto.dependency: array expected');\n message.dependency = [];\n for (let i = 0; i < object.dependency.length; ++i)\n message.dependency[i] = String(object.dependency[i]);\n }\n if (object.publicDependency) {\n if (!Array.isArray(object.publicDependency))\n throw TypeError('.google.protobuf.FileDescriptorProto.publicDependency: array expected');\n message.publicDependency = [];\n for (let i = 0; i < object.publicDependency.length; ++i)\n message.publicDependency[i] = object.publicDependency[i] | 0;\n }\n if (object.weakDependency) {\n if (!Array.isArray(object.weakDependency))\n throw TypeError('.google.protobuf.FileDescriptorProto.weakDependency: array expected');\n message.weakDependency = [];\n for (let i = 0; i < object.weakDependency.length; ++i)\n message.weakDependency[i] = object.weakDependency[i] | 0;\n }\n if (object.messageType) {\n if (!Array.isArray(object.messageType))\n throw TypeError('.google.protobuf.FileDescriptorProto.messageType: array expected');\n message.messageType = [];\n for (let i = 0; i < object.messageType.length; ++i) {\n if (typeof object.messageType[i] !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.messageType: object expected');\n message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]);\n }\n }\n if (object.enumType) {\n if (!Array.isArray(object.enumType))\n throw TypeError('.google.protobuf.FileDescriptorProto.enumType: array expected');\n message.enumType = [];\n for (let i = 0; i < object.enumType.length; ++i) {\n if (typeof object.enumType[i] !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.enumType: object expected');\n message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);\n }\n }\n if (object.service) {\n if (!Array.isArray(object.service))\n throw TypeError('.google.protobuf.FileDescriptorProto.service: array expected');\n message.service = [];\n for (let i = 0; i < object.service.length; ++i) {\n if (typeof object.service[i] !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.service: object expected');\n message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]);\n }\n }\n if (object.extension) {\n if (!Array.isArray(object.extension))\n throw TypeError('.google.protobuf.FileDescriptorProto.extension: array expected');\n message.extension = [];\n for (let i = 0; i < object.extension.length; ++i) {\n if (typeof object.extension[i] !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.extension: object expected');\n message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);\n }\n }\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.FileOptions.fromObject(object.options);\n }\n if (object.sourceCodeInfo != null) {\n if (typeof object.sourceCodeInfo !== 'object')\n throw TypeError('.google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected');\n message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo);\n }\n if (object.syntax != null)\n message.syntax = String(object.syntax);\n return message;\n };\n\n /**\n * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.FileDescriptorProto\n * @static\n * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n FileDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.dependency = [];\n object.messageType = [];\n object.enumType = [];\n object.service = [];\n object.extension = [];\n object.publicDependency = [];\n object.weakDependency = [];\n }\n if (options.defaults) {\n object.name = '';\n object['package'] = '';\n object.options = null;\n object.sourceCodeInfo = null;\n object.syntax = '';\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message['package'] != null && message.hasOwnProperty('package'))\n object['package'] = message['package'];\n if (message.dependency && message.dependency.length) {\n object.dependency = [];\n for (let j = 0; j < message.dependency.length; ++j)\n object.dependency[j] = message.dependency[j];\n }\n if (message.messageType && message.messageType.length) {\n object.messageType = [];\n for (let j = 0; j < message.messageType.length; ++j)\n object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options);\n }\n if (message.enumType && message.enumType.length) {\n object.enumType = [];\n for (let j = 0; j < message.enumType.length; ++j)\n object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);\n }\n if (message.service && message.service.length) {\n object.service = [];\n for (let j = 0; j < message.service.length; ++j)\n object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);\n }\n if (message.extension && message.extension.length) {\n object.extension = [];\n for (let j = 0; j < message.extension.length; ++j)\n object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);\n }\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.FileOptions.toObject(message.options, options);\n if (message.sourceCodeInfo != null && message.hasOwnProperty('sourceCodeInfo'))\n object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options);\n if (message.publicDependency && message.publicDependency.length) {\n object.publicDependency = [];\n for (let j = 0; j < message.publicDependency.length; ++j)\n object.publicDependency[j] = message.publicDependency[j];\n }\n if (message.weakDependency && message.weakDependency.length) {\n object.weakDependency = [];\n for (let j = 0; j < message.weakDependency.length; ++j)\n object.weakDependency[j] = message.weakDependency[j];\n }\n if (message.syntax != null && message.hasOwnProperty('syntax'))\n object.syntax = message.syntax;\n return object;\n };\n\n /**\n * Converts this FileDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.FileDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n FileDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return FileDescriptorProto;\n })();\n\n protobuf.DescriptorProto = (function () {\n\n /**\n * Properties of a DescriptorProto.\n * @memberof google.protobuf\n * @interface IDescriptorProto\n * @property {string|null} [name] DescriptorProto name\n * @property {Array.|null} [field] DescriptorProto field\n * @property {Array.|null} [extension] DescriptorProto extension\n * @property {Array.|null} [nestedType] DescriptorProto nestedType\n * @property {Array.|null} [enumType] DescriptorProto enumType\n * @property {Array.|null} [extensionRange] DescriptorProto extensionRange\n * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl\n * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options\n * @property {Array.|null} [reservedRange] DescriptorProto reservedRange\n * @property {Array.|null} [reservedName] DescriptorProto reservedName\n */\n\n /**\n * Constructs a new DescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents a DescriptorProto.\n * @implements IDescriptorProto\n * @constructor\n * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set\n */\n function DescriptorProto(properties) {\n this.field = [];\n this.extension = [];\n this.nestedType = [];\n this.enumType = [];\n this.extensionRange = [];\n this.oneofDecl = [];\n this.reservedRange = [];\n this.reservedName = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * DescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.name = '';\n\n /**\n * DescriptorProto field.\n * @member {Array.} field\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.field = $util.emptyArray;\n\n /**\n * DescriptorProto extension.\n * @member {Array.} extension\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.extension = $util.emptyArray;\n\n /**\n * DescriptorProto nestedType.\n * @member {Array.} nestedType\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.nestedType = $util.emptyArray;\n\n /**\n * DescriptorProto enumType.\n * @member {Array.} enumType\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.enumType = $util.emptyArray;\n\n /**\n * DescriptorProto extensionRange.\n * @member {Array.} extensionRange\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.extensionRange = $util.emptyArray;\n\n /**\n * DescriptorProto oneofDecl.\n * @member {Array.} oneofDecl\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.oneofDecl = $util.emptyArray;\n\n /**\n * DescriptorProto options.\n * @member {google.protobuf.IMessageOptions|null|undefined} options\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.options = null;\n\n /**\n * DescriptorProto reservedRange.\n * @member {Array.} reservedRange\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.reservedRange = $util.emptyArray;\n\n /**\n * DescriptorProto reservedName.\n * @member {Array.} reservedName\n * @memberof google.protobuf.DescriptorProto\n * @instance\n */\n DescriptorProto.prototype.reservedName = $util.emptyArray;\n\n /**\n * Creates a new DescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.DescriptorProto} DescriptorProto instance\n */\n DescriptorProto.create = function create(properties) {\n return new DescriptorProto(properties);\n };\n\n /**\n * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.field != null && message.field.length)\n for (let i = 0; i < message.field.length; ++i)\n $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.nestedType != null && message.nestedType.length)\n for (let i = 0; i < message.nestedType.length; ++i)\n $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n if (message.enumType != null && message.enumType.length)\n for (let i = 0; i < message.enumType.length; ++i)\n $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.extensionRange != null && message.extensionRange.length)\n for (let i = 0; i < message.extensionRange.length; ++i)\n $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();\n if (message.extension != null && message.extension.length)\n for (let i = 0; i < message.extension.length; ++i)\n $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();\n if (message.oneofDecl != null && message.oneofDecl.length)\n for (let i = 0; i < message.oneofDecl.length; ++i)\n $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.reservedRange != null && message.reservedRange.length)\n for (let i = 0; i < message.reservedRange.length; ++i)\n $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();\n if (message.reservedName != null && message.reservedName.length)\n for (let i = 0; i < message.reservedName.length; ++i)\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]);\n return writer;\n };\n\n /**\n * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.DescriptorProto} DescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n if (!(message.field && message.field.length))\n message.field = [];\n message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 6:\n if (!(message.extension && message.extension.length))\n message.extension = [];\n message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 3:\n if (!(message.nestedType && message.nestedType.length))\n message.nestedType = [];\n message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));\n break;\n case 4:\n if (!(message.enumType && message.enumType.length))\n message.enumType = [];\n message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 5:\n if (!(message.extensionRange && message.extensionRange.length))\n message.extensionRange = [];\n message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32()));\n break;\n case 8:\n if (!(message.oneofDecl && message.oneofDecl.length))\n message.oneofDecl = [];\n message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 7:\n message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32());\n break;\n case 9:\n if (!(message.reservedRange && message.reservedRange.length))\n message.reservedRange = [];\n message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32()));\n break;\n case 10:\n if (!(message.reservedName && message.reservedName.length))\n message.reservedName = [];\n message.reservedName.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.DescriptorProto} DescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a DescriptorProto message.\n * @function verify\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n DescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.field != null && message.hasOwnProperty('field')) {\n if (!Array.isArray(message.field))\n return 'field: array expected';\n for (let i = 0; i < message.field.length; ++i) {\n let error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]);\n if (error)\n return 'field.' + error;\n }\n }\n if (message.extension != null && message.hasOwnProperty('extension')) {\n if (!Array.isArray(message.extension))\n return 'extension: array expected';\n for (let i = 0; i < message.extension.length; ++i) {\n let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);\n if (error)\n return 'extension.' + error;\n }\n }\n if (message.nestedType != null && message.hasOwnProperty('nestedType')) {\n if (!Array.isArray(message.nestedType))\n return 'nestedType: array expected';\n for (let i = 0; i < message.nestedType.length; ++i) {\n let error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]);\n if (error)\n return 'nestedType.' + error;\n }\n }\n if (message.enumType != null && message.hasOwnProperty('enumType')) {\n if (!Array.isArray(message.enumType))\n return 'enumType: array expected';\n for (let i = 0; i < message.enumType.length; ++i) {\n let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);\n if (error)\n return 'enumType.' + error;\n }\n }\n if (message.extensionRange != null && message.hasOwnProperty('extensionRange')) {\n if (!Array.isArray(message.extensionRange))\n return 'extensionRange: array expected';\n for (let i = 0; i < message.extensionRange.length; ++i) {\n let error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]);\n if (error)\n return 'extensionRange.' + error;\n }\n }\n if (message.oneofDecl != null && message.hasOwnProperty('oneofDecl')) {\n if (!Array.isArray(message.oneofDecl))\n return 'oneofDecl: array expected';\n for (let i = 0; i < message.oneofDecl.length; ++i) {\n let error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]);\n if (error)\n return 'oneofDecl.' + error;\n }\n }\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.MessageOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n if (message.reservedRange != null && message.hasOwnProperty('reservedRange')) {\n if (!Array.isArray(message.reservedRange))\n return 'reservedRange: array expected';\n for (let i = 0; i < message.reservedRange.length; ++i) {\n let error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]);\n if (error)\n return 'reservedRange.' + error;\n }\n }\n if (message.reservedName != null && message.hasOwnProperty('reservedName')) {\n if (!Array.isArray(message.reservedName))\n return 'reservedName: array expected';\n for (let i = 0; i < message.reservedName.length; ++i)\n if (!$util.isString(message.reservedName[i]))\n return 'reservedName: string[] expected';\n }\n return null;\n };\n\n /**\n * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.DescriptorProto} DescriptorProto\n */\n DescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.DescriptorProto)\n return object;\n let message = new $root.google.protobuf.DescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.field) {\n if (!Array.isArray(object.field))\n throw TypeError('.google.protobuf.DescriptorProto.field: array expected');\n message.field = [];\n for (let i = 0; i < object.field.length; ++i) {\n if (typeof object.field[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.field: object expected');\n message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]);\n }\n }\n if (object.extension) {\n if (!Array.isArray(object.extension))\n throw TypeError('.google.protobuf.DescriptorProto.extension: array expected');\n message.extension = [];\n for (let i = 0; i < object.extension.length; ++i) {\n if (typeof object.extension[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.extension: object expected');\n message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);\n }\n }\n if (object.nestedType) {\n if (!Array.isArray(object.nestedType))\n throw TypeError('.google.protobuf.DescriptorProto.nestedType: array expected');\n message.nestedType = [];\n for (let i = 0; i < object.nestedType.length; ++i) {\n if (typeof object.nestedType[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.nestedType: object expected');\n message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]);\n }\n }\n if (object.enumType) {\n if (!Array.isArray(object.enumType))\n throw TypeError('.google.protobuf.DescriptorProto.enumType: array expected');\n message.enumType = [];\n for (let i = 0; i < object.enumType.length; ++i) {\n if (typeof object.enumType[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.enumType: object expected');\n message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);\n }\n }\n if (object.extensionRange) {\n if (!Array.isArray(object.extensionRange))\n throw TypeError('.google.protobuf.DescriptorProto.extensionRange: array expected');\n message.extensionRange = [];\n for (let i = 0; i < object.extensionRange.length; ++i) {\n if (typeof object.extensionRange[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.extensionRange: object expected');\n message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]);\n }\n }\n if (object.oneofDecl) {\n if (!Array.isArray(object.oneofDecl))\n throw TypeError('.google.protobuf.DescriptorProto.oneofDecl: array expected');\n message.oneofDecl = [];\n for (let i = 0; i < object.oneofDecl.length; ++i) {\n if (typeof object.oneofDecl[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.oneofDecl: object expected');\n message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]);\n }\n }\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.options: object expected');\n message.options = $root.google.protobuf.MessageOptions.fromObject(object.options);\n }\n if (object.reservedRange) {\n if (!Array.isArray(object.reservedRange))\n throw TypeError('.google.protobuf.DescriptorProto.reservedRange: array expected');\n message.reservedRange = [];\n for (let i = 0; i < object.reservedRange.length; ++i) {\n if (typeof object.reservedRange[i] !== 'object')\n throw TypeError('.google.protobuf.DescriptorProto.reservedRange: object expected');\n message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]);\n }\n }\n if (object.reservedName) {\n if (!Array.isArray(object.reservedName))\n throw TypeError('.google.protobuf.DescriptorProto.reservedName: array expected');\n message.reservedName = [];\n for (let i = 0; i < object.reservedName.length; ++i)\n message.reservedName[i] = String(object.reservedName[i]);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.DescriptorProto\n * @static\n * @param {google.protobuf.DescriptorProto} message DescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n DescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.field = [];\n object.nestedType = [];\n object.enumType = [];\n object.extensionRange = [];\n object.extension = [];\n object.oneofDecl = [];\n object.reservedRange = [];\n object.reservedName = [];\n }\n if (options.defaults) {\n object.name = '';\n object.options = null;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.field && message.field.length) {\n object.field = [];\n for (let j = 0; j < message.field.length; ++j)\n object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);\n }\n if (message.nestedType && message.nestedType.length) {\n object.nestedType = [];\n for (let j = 0; j < message.nestedType.length; ++j)\n object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options);\n }\n if (message.enumType && message.enumType.length) {\n object.enumType = [];\n for (let j = 0; j < message.enumType.length; ++j)\n object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);\n }\n if (message.extensionRange && message.extensionRange.length) {\n object.extensionRange = [];\n for (let j = 0; j < message.extensionRange.length; ++j)\n object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options);\n }\n if (message.extension && message.extension.length) {\n object.extension = [];\n for (let j = 0; j < message.extension.length; ++j)\n object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);\n }\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);\n if (message.oneofDecl && message.oneofDecl.length) {\n object.oneofDecl = [];\n for (let j = 0; j < message.oneofDecl.length; ++j)\n object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options);\n }\n if (message.reservedRange && message.reservedRange.length) {\n object.reservedRange = [];\n for (let j = 0; j < message.reservedRange.length; ++j)\n object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options);\n }\n if (message.reservedName && message.reservedName.length) {\n object.reservedName = [];\n for (let j = 0; j < message.reservedName.length; ++j)\n object.reservedName[j] = message.reservedName[j];\n }\n return object;\n };\n\n /**\n * Converts this DescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.DescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n DescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n DescriptorProto.ExtensionRange = (function () {\n\n /**\n * Properties of an ExtensionRange.\n * @memberof google.protobuf.DescriptorProto\n * @interface IExtensionRange\n * @property {number|null} [start] ExtensionRange start\n * @property {number|null} [end] ExtensionRange end\n */\n\n /**\n * Constructs a new ExtensionRange.\n * @memberof google.protobuf.DescriptorProto\n * @classdesc Represents an ExtensionRange.\n * @implements IExtensionRange\n * @constructor\n * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set\n */\n function ExtensionRange(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ExtensionRange start.\n * @member {number} start\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @instance\n */\n ExtensionRange.prototype.start = 0;\n\n /**\n * ExtensionRange end.\n * @member {number} end\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @instance\n */\n ExtensionRange.prototype.end = 0;\n\n /**\n * Creates a new ExtensionRange instance using the specified properties.\n * @function create\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set\n * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance\n */\n ExtensionRange.create = function create(properties) {\n return new ExtensionRange(properties);\n };\n\n /**\n * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExtensionRange.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.start != null && message.hasOwnProperty('start'))\n writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);\n if (message.end != null && message.hasOwnProperty('end'))\n writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);\n return writer;\n };\n\n /**\n * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an ExtensionRange message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExtensionRange.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.start = reader.int32();\n break;\n case 2:\n message.end = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExtensionRange.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an ExtensionRange message.\n * @function verify\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExtensionRange.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.start != null && message.hasOwnProperty('start'))\n if (!$util.isInteger(message.start))\n return 'start: integer expected';\n if (message.end != null && message.hasOwnProperty('end'))\n if (!$util.isInteger(message.end))\n return 'end: integer expected';\n return null;\n };\n\n /**\n * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange\n */\n ExtensionRange.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)\n return object;\n let message = new $root.google.protobuf.DescriptorProto.ExtensionRange();\n if (object.start != null)\n message.start = object.start | 0;\n if (object.end != null)\n message.end = object.end | 0;\n return message;\n };\n\n /**\n * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @static\n * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExtensionRange.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.start = 0;\n object.end = 0;\n }\n if (message.start != null && message.hasOwnProperty('start'))\n object.start = message.start;\n if (message.end != null && message.hasOwnProperty('end'))\n object.end = message.end;\n return object;\n };\n\n /**\n * Converts this ExtensionRange to JSON.\n * @function toJSON\n * @memberof google.protobuf.DescriptorProto.ExtensionRange\n * @instance\n * @returns {Object.} JSON object\n */\n ExtensionRange.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ExtensionRange;\n })();\n\n DescriptorProto.ReservedRange = (function () {\n\n /**\n * Properties of a ReservedRange.\n * @memberof google.protobuf.DescriptorProto\n * @interface IReservedRange\n * @property {number|null} [start] ReservedRange start\n * @property {number|null} [end] ReservedRange end\n */\n\n /**\n * Constructs a new ReservedRange.\n * @memberof google.protobuf.DescriptorProto\n * @classdesc Represents a ReservedRange.\n * @implements IReservedRange\n * @constructor\n * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set\n */\n function ReservedRange(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ReservedRange start.\n * @member {number} start\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @instance\n */\n ReservedRange.prototype.start = 0;\n\n /**\n * ReservedRange end.\n * @member {number} end\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @instance\n */\n ReservedRange.prototype.end = 0;\n\n /**\n * Creates a new ReservedRange instance using the specified properties.\n * @function create\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set\n * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance\n */\n ReservedRange.create = function create(properties) {\n return new ReservedRange(properties);\n };\n\n /**\n * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReservedRange.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.start != null && message.hasOwnProperty('start'))\n writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);\n if (message.end != null && message.hasOwnProperty('end'))\n writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);\n return writer;\n };\n\n /**\n * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ReservedRange message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReservedRange.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.start = reader.int32();\n break;\n case 2:\n message.end = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ReservedRange message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ReservedRange.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ReservedRange message.\n * @function verify\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ReservedRange.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.start != null && message.hasOwnProperty('start'))\n if (!$util.isInteger(message.start))\n return 'start: integer expected';\n if (message.end != null && message.hasOwnProperty('end'))\n if (!$util.isInteger(message.end))\n return 'end: integer expected';\n return null;\n };\n\n /**\n * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange\n */\n ReservedRange.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)\n return object;\n let message = new $root.google.protobuf.DescriptorProto.ReservedRange();\n if (object.start != null)\n message.start = object.start | 0;\n if (object.end != null)\n message.end = object.end | 0;\n return message;\n };\n\n /**\n * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @static\n * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ReservedRange.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.start = 0;\n object.end = 0;\n }\n if (message.start != null && message.hasOwnProperty('start'))\n object.start = message.start;\n if (message.end != null && message.hasOwnProperty('end'))\n object.end = message.end;\n return object;\n };\n\n /**\n * Converts this ReservedRange to JSON.\n * @function toJSON\n * @memberof google.protobuf.DescriptorProto.ReservedRange\n * @instance\n * @returns {Object.} JSON object\n */\n ReservedRange.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ReservedRange;\n })();\n\n return DescriptorProto;\n })();\n\n protobuf.FieldDescriptorProto = (function () {\n\n /**\n * Properties of a FieldDescriptorProto.\n * @memberof google.protobuf\n * @interface IFieldDescriptorProto\n * @property {string|null} [name] FieldDescriptorProto name\n * @property {number|null} [number] FieldDescriptorProto number\n * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label\n * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type\n * @property {string|null} [typeName] FieldDescriptorProto typeName\n * @property {string|null} [extendee] FieldDescriptorProto extendee\n * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue\n * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex\n * @property {string|null} [jsonName] FieldDescriptorProto jsonName\n * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options\n */\n\n /**\n * Constructs a new FieldDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents a FieldDescriptorProto.\n * @implements IFieldDescriptorProto\n * @constructor\n * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set\n */\n function FieldDescriptorProto(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * FieldDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.name = '';\n\n /**\n * FieldDescriptorProto number.\n * @member {number} number\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.number = 0;\n\n /**\n * FieldDescriptorProto label.\n * @member {google.protobuf.FieldDescriptorProto.Label} label\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.label = 1;\n\n /**\n * FieldDescriptorProto type.\n * @member {google.protobuf.FieldDescriptorProto.Type} type\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.type = 1;\n\n /**\n * FieldDescriptorProto typeName.\n * @member {string} typeName\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.typeName = '';\n\n /**\n * FieldDescriptorProto extendee.\n * @member {string} extendee\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.extendee = '';\n\n /**\n * FieldDescriptorProto defaultValue.\n * @member {string} defaultValue\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.defaultValue = '';\n\n /**\n * FieldDescriptorProto oneofIndex.\n * @member {number} oneofIndex\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.oneofIndex = 0;\n\n /**\n * FieldDescriptorProto jsonName.\n * @member {string} jsonName\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.jsonName = '';\n\n /**\n * FieldDescriptorProto options.\n * @member {google.protobuf.IFieldOptions|null|undefined} options\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n */\n FieldDescriptorProto.prototype.options = null;\n\n /**\n * Creates a new FieldDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance\n */\n FieldDescriptorProto.create = function create(properties) {\n return new FieldDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FieldDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.extendee != null && message.hasOwnProperty('extendee'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);\n if (message.number != null && message.hasOwnProperty('number'))\n writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number);\n if (message.label != null && message.hasOwnProperty('label'))\n writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);\n if (message.type != null && message.hasOwnProperty('type'))\n writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);\n if (message.typeName != null && message.hasOwnProperty('typeName'))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName);\n if (message.defaultValue != null && message.hasOwnProperty('defaultValue'))\n writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue);\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.oneofIndex != null && message.hasOwnProperty('oneofIndex'))\n writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex);\n if (message.jsonName != null && message.hasOwnProperty('jsonName'))\n writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName);\n return writer;\n };\n\n /**\n * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FieldDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FieldDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 3:\n message.number = reader.int32();\n break;\n case 4:\n message.label = reader.int32();\n break;\n case 5:\n message.type = reader.int32();\n break;\n case 6:\n message.typeName = reader.string();\n break;\n case 2:\n message.extendee = reader.string();\n break;\n case 7:\n message.defaultValue = reader.string();\n break;\n case 9:\n message.oneofIndex = reader.int32();\n break;\n case 10:\n message.jsonName = reader.string();\n break;\n case 8:\n message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a FieldDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n FieldDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.number != null && message.hasOwnProperty('number'))\n if (!$util.isInteger(message.number))\n return 'number: integer expected';\n if (message.label != null && message.hasOwnProperty('label'))\n switch (message.label) {\n default:\n return 'label: enum value expected';\n case 1:\n case 2:\n case 3:\n break;\n }\n if (message.type != null && message.hasOwnProperty('type'))\n switch (message.type) {\n default:\n return 'type: enum value expected';\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n case 16:\n case 17:\n case 18:\n break;\n }\n if (message.typeName != null && message.hasOwnProperty('typeName'))\n if (!$util.isString(message.typeName))\n return 'typeName: string expected';\n if (message.extendee != null && message.hasOwnProperty('extendee'))\n if (!$util.isString(message.extendee))\n return 'extendee: string expected';\n if (message.defaultValue != null && message.hasOwnProperty('defaultValue'))\n if (!$util.isString(message.defaultValue))\n return 'defaultValue: string expected';\n if (message.oneofIndex != null && message.hasOwnProperty('oneofIndex'))\n if (!$util.isInteger(message.oneofIndex))\n return 'oneofIndex: integer expected';\n if (message.jsonName != null && message.hasOwnProperty('jsonName'))\n if (!$util.isString(message.jsonName))\n return 'jsonName: string expected';\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.FieldOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n return null;\n };\n\n /**\n * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto\n */\n FieldDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.FieldDescriptorProto)\n return object;\n let message = new $root.google.protobuf.FieldDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.number != null)\n message.number = object.number | 0;\n switch (object.label) {\n case 'LABEL_OPTIONAL':\n case 1:\n message.label = 1;\n break;\n case 'LABEL_REQUIRED':\n case 2:\n message.label = 2;\n break;\n case 'LABEL_REPEATED':\n case 3:\n message.label = 3;\n break;\n }\n switch (object.type) {\n case 'TYPE_DOUBLE':\n case 1:\n message.type = 1;\n break;\n case 'TYPE_FLOAT':\n case 2:\n message.type = 2;\n break;\n case 'TYPE_INT64':\n case 3:\n message.type = 3;\n break;\n case 'TYPE_UINT64':\n case 4:\n message.type = 4;\n break;\n case 'TYPE_INT32':\n case 5:\n message.type = 5;\n break;\n case 'TYPE_FIXED64':\n case 6:\n message.type = 6;\n break;\n case 'TYPE_FIXED32':\n case 7:\n message.type = 7;\n break;\n case 'TYPE_BOOL':\n case 8:\n message.type = 8;\n break;\n case 'TYPE_STRING':\n case 9:\n message.type = 9;\n break;\n case 'TYPE_GROUP':\n case 10:\n message.type = 10;\n break;\n case 'TYPE_MESSAGE':\n case 11:\n message.type = 11;\n break;\n case 'TYPE_BYTES':\n case 12:\n message.type = 12;\n break;\n case 'TYPE_UINT32':\n case 13:\n message.type = 13;\n break;\n case 'TYPE_ENUM':\n case 14:\n message.type = 14;\n break;\n case 'TYPE_SFIXED32':\n case 15:\n message.type = 15;\n break;\n case 'TYPE_SFIXED64':\n case 16:\n message.type = 16;\n break;\n case 'TYPE_SINT32':\n case 17:\n message.type = 17;\n break;\n case 'TYPE_SINT64':\n case 18:\n message.type = 18;\n break;\n }\n if (object.typeName != null)\n message.typeName = String(object.typeName);\n if (object.extendee != null)\n message.extendee = String(object.extendee);\n if (object.defaultValue != null)\n message.defaultValue = String(object.defaultValue);\n if (object.oneofIndex != null)\n message.oneofIndex = object.oneofIndex | 0;\n if (object.jsonName != null)\n message.jsonName = String(object.jsonName);\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.FieldDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.FieldDescriptorProto\n * @static\n * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n FieldDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.name = '';\n object.extendee = '';\n object.number = 0;\n object.label = options.enums === String ? 'LABEL_OPTIONAL' : 1;\n object.type = options.enums === String ? 'TYPE_DOUBLE' : 1;\n object.typeName = '';\n object.defaultValue = '';\n object.options = null;\n object.oneofIndex = 0;\n object.jsonName = '';\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.extendee != null && message.hasOwnProperty('extendee'))\n object.extendee = message.extendee;\n if (message.number != null && message.hasOwnProperty('number'))\n object.number = message.number;\n if (message.label != null && message.hasOwnProperty('label'))\n object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;\n if (message.type != null && message.hasOwnProperty('type'))\n object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;\n if (message.typeName != null && message.hasOwnProperty('typeName'))\n object.typeName = message.typeName;\n if (message.defaultValue != null && message.hasOwnProperty('defaultValue'))\n object.defaultValue = message.defaultValue;\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);\n if (message.oneofIndex != null && message.hasOwnProperty('oneofIndex'))\n object.oneofIndex = message.oneofIndex;\n if (message.jsonName != null && message.hasOwnProperty('jsonName'))\n object.jsonName = message.jsonName;\n return object;\n };\n\n /**\n * Converts this FieldDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.FieldDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n FieldDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n /**\n * Type enum.\n * @name google.protobuf.FieldDescriptorProto.Type\n * @enum {string}\n * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value\n * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value\n * @property {number} TYPE_INT64=3 TYPE_INT64 value\n * @property {number} TYPE_UINT64=4 TYPE_UINT64 value\n * @property {number} TYPE_INT32=5 TYPE_INT32 value\n * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value\n * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value\n * @property {number} TYPE_BOOL=8 TYPE_BOOL value\n * @property {number} TYPE_STRING=9 TYPE_STRING value\n * @property {number} TYPE_GROUP=10 TYPE_GROUP value\n * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value\n * @property {number} TYPE_BYTES=12 TYPE_BYTES value\n * @property {number} TYPE_UINT32=13 TYPE_UINT32 value\n * @property {number} TYPE_ENUM=14 TYPE_ENUM value\n * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value\n * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value\n * @property {number} TYPE_SINT32=17 TYPE_SINT32 value\n * @property {number} TYPE_SINT64=18 TYPE_SINT64 value\n */\n FieldDescriptorProto.Type = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[1] = 'TYPE_DOUBLE'] = 1;\n values[valuesById[2] = 'TYPE_FLOAT'] = 2;\n values[valuesById[3] = 'TYPE_INT64'] = 3;\n values[valuesById[4] = 'TYPE_UINT64'] = 4;\n values[valuesById[5] = 'TYPE_INT32'] = 5;\n values[valuesById[6] = 'TYPE_FIXED64'] = 6;\n values[valuesById[7] = 'TYPE_FIXED32'] = 7;\n values[valuesById[8] = 'TYPE_BOOL'] = 8;\n values[valuesById[9] = 'TYPE_STRING'] = 9;\n values[valuesById[10] = 'TYPE_GROUP'] = 10;\n values[valuesById[11] = 'TYPE_MESSAGE'] = 11;\n values[valuesById[12] = 'TYPE_BYTES'] = 12;\n values[valuesById[13] = 'TYPE_UINT32'] = 13;\n values[valuesById[14] = 'TYPE_ENUM'] = 14;\n values[valuesById[15] = 'TYPE_SFIXED32'] = 15;\n values[valuesById[16] = 'TYPE_SFIXED64'] = 16;\n values[valuesById[17] = 'TYPE_SINT32'] = 17;\n values[valuesById[18] = 'TYPE_SINT64'] = 18;\n return values;\n })();\n\n /**\n * Label enum.\n * @name google.protobuf.FieldDescriptorProto.Label\n * @enum {string}\n * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value\n * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value\n * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value\n */\n FieldDescriptorProto.Label = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[1] = 'LABEL_OPTIONAL'] = 1;\n values[valuesById[2] = 'LABEL_REQUIRED'] = 2;\n values[valuesById[3] = 'LABEL_REPEATED'] = 3;\n return values;\n })();\n\n return FieldDescriptorProto;\n })();\n\n protobuf.OneofDescriptorProto = (function () {\n\n /**\n * Properties of an OneofDescriptorProto.\n * @memberof google.protobuf\n * @interface IOneofDescriptorProto\n * @property {string|null} [name] OneofDescriptorProto name\n * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options\n */\n\n /**\n * Constructs a new OneofDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents an OneofDescriptorProto.\n * @implements IOneofDescriptorProto\n * @constructor\n * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set\n */\n function OneofDescriptorProto(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * OneofDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.OneofDescriptorProto\n * @instance\n */\n OneofDescriptorProto.prototype.name = '';\n\n /**\n * OneofDescriptorProto options.\n * @member {google.protobuf.IOneofOptions|null|undefined} options\n * @memberof google.protobuf.OneofDescriptorProto\n * @instance\n */\n OneofDescriptorProto.prototype.options = null;\n\n /**\n * Creates a new OneofDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance\n */\n OneofDescriptorProto.create = function create(properties) {\n return new OneofDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n OneofDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an OneofDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n OneofDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an OneofDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n OneofDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.OneofOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n return null;\n };\n\n /**\n * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto\n */\n OneofDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.OneofDescriptorProto)\n return object;\n let message = new $root.google.protobuf.OneofDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.OneofDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.OneofOptions.fromObject(object.options);\n }\n return message;\n };\n\n /**\n * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.OneofDescriptorProto\n * @static\n * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n OneofDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.name = '';\n object.options = null;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options);\n return object;\n };\n\n /**\n * Converts this OneofDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.OneofDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n OneofDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return OneofDescriptorProto;\n })();\n\n protobuf.EnumDescriptorProto = (function () {\n\n /**\n * Properties of an EnumDescriptorProto.\n * @memberof google.protobuf\n * @interface IEnumDescriptorProto\n * @property {string|null} [name] EnumDescriptorProto name\n * @property {Array.|null} [value] EnumDescriptorProto value\n * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options\n */\n\n /**\n * Constructs a new EnumDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents an EnumDescriptorProto.\n * @implements IEnumDescriptorProto\n * @constructor\n * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set\n */\n function EnumDescriptorProto(properties) {\n this.value = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EnumDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.EnumDescriptorProto\n * @instance\n */\n EnumDescriptorProto.prototype.name = '';\n\n /**\n * EnumDescriptorProto value.\n * @member {Array.} value\n * @memberof google.protobuf.EnumDescriptorProto\n * @instance\n */\n EnumDescriptorProto.prototype.value = $util.emptyArray;\n\n /**\n * EnumDescriptorProto options.\n * @member {google.protobuf.IEnumOptions|null|undefined} options\n * @memberof google.protobuf.EnumDescriptorProto\n * @instance\n */\n EnumDescriptorProto.prototype.options = null;\n\n /**\n * Creates a new EnumDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance\n */\n EnumDescriptorProto.create = function create(properties) {\n return new EnumDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.value != null && message.value.length)\n for (let i = 0; i < message.value.length; ++i)\n $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EnumDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n if (!(message.value && message.value.length))\n message.value = [];\n message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 3:\n message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EnumDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EnumDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.value != null && message.hasOwnProperty('value')) {\n if (!Array.isArray(message.value))\n return 'value: array expected';\n for (let i = 0; i < message.value.length; ++i) {\n let error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]);\n if (error)\n return 'value.' + error;\n }\n }\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.EnumOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n return null;\n };\n\n /**\n * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto\n */\n EnumDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.EnumDescriptorProto)\n return object;\n let message = new $root.google.protobuf.EnumDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.value) {\n if (!Array.isArray(object.value))\n throw TypeError('.google.protobuf.EnumDescriptorProto.value: array expected');\n message.value = [];\n for (let i = 0; i < object.value.length; ++i) {\n if (typeof object.value[i] !== 'object')\n throw TypeError('.google.protobuf.EnumDescriptorProto.value: object expected');\n message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]);\n }\n }\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.EnumDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.EnumOptions.fromObject(object.options);\n }\n return message;\n };\n\n /**\n * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.EnumDescriptorProto\n * @static\n * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n EnumDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.value = [];\n if (options.defaults) {\n object.name = '';\n object.options = null;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.value && message.value.length) {\n object.value = [];\n for (let j = 0; j < message.value.length; ++j)\n object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);\n }\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);\n return object;\n };\n\n /**\n * Converts this EnumDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.EnumDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n EnumDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return EnumDescriptorProto;\n })();\n\n protobuf.EnumValueDescriptorProto = (function () {\n\n /**\n * Properties of an EnumValueDescriptorProto.\n * @memberof google.protobuf\n * @interface IEnumValueDescriptorProto\n * @property {string|null} [name] EnumValueDescriptorProto name\n * @property {number|null} [number] EnumValueDescriptorProto number\n * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options\n */\n\n /**\n * Constructs a new EnumValueDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents an EnumValueDescriptorProto.\n * @implements IEnumValueDescriptorProto\n * @constructor\n * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set\n */\n function EnumValueDescriptorProto(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EnumValueDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @instance\n */\n EnumValueDescriptorProto.prototype.name = '';\n\n /**\n * EnumValueDescriptorProto number.\n * @member {number} number\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @instance\n */\n EnumValueDescriptorProto.prototype.number = 0;\n\n /**\n * EnumValueDescriptorProto options.\n * @member {google.protobuf.IEnumValueOptions|null|undefined} options\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @instance\n */\n EnumValueDescriptorProto.prototype.options = null;\n\n /**\n * Creates a new EnumValueDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance\n */\n EnumValueDescriptorProto.create = function create(properties) {\n return new EnumValueDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumValueDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.number != null && message.hasOwnProperty('number'))\n writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number);\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumValueDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.number = reader.int32();\n break;\n case 3:\n message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EnumValueDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EnumValueDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.number != null && message.hasOwnProperty('number'))\n if (!$util.isInteger(message.number))\n return 'number: integer expected';\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.EnumValueOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n return null;\n };\n\n /**\n * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto\n */\n EnumValueDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)\n return object;\n let message = new $root.google.protobuf.EnumValueDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.number != null)\n message.number = object.number | 0;\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.EnumValueDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options);\n }\n return message;\n };\n\n /**\n * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @static\n * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n EnumValueDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.name = '';\n object.number = 0;\n object.options = null;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.number != null && message.hasOwnProperty('number'))\n object.number = message.number;\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);\n return object;\n };\n\n /**\n * Converts this EnumValueDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.EnumValueDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n EnumValueDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return EnumValueDescriptorProto;\n })();\n\n protobuf.ServiceDescriptorProto = (function () {\n\n /**\n * Properties of a ServiceDescriptorProto.\n * @memberof google.protobuf\n * @interface IServiceDescriptorProto\n * @property {string|null} [name] ServiceDescriptorProto name\n * @property {Array.|null} [method] ServiceDescriptorProto method\n * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options\n */\n\n /**\n * Constructs a new ServiceDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents a ServiceDescriptorProto.\n * @implements IServiceDescriptorProto\n * @constructor\n * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set\n */\n function ServiceDescriptorProto(properties) {\n this.method = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ServiceDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.ServiceDescriptorProto\n * @instance\n */\n ServiceDescriptorProto.prototype.name = '';\n\n /**\n * ServiceDescriptorProto method.\n * @member {Array.} method\n * @memberof google.protobuf.ServiceDescriptorProto\n * @instance\n */\n ServiceDescriptorProto.prototype.method = $util.emptyArray;\n\n /**\n * ServiceDescriptorProto options.\n * @member {google.protobuf.IServiceOptions|null|undefined} options\n * @memberof google.protobuf.ServiceDescriptorProto\n * @instance\n */\n ServiceDescriptorProto.prototype.options = null;\n\n /**\n * Creates a new ServiceDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance\n */\n ServiceDescriptorProto.create = function create(properties) {\n return new ServiceDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ServiceDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.method != null && message.method.length)\n for (let i = 0; i < message.method.length; ++i)\n $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ServiceDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ServiceDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n if (!(message.method && message.method.length))\n message.method = [];\n message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32()));\n break;\n case 3:\n message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ServiceDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ServiceDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.method != null && message.hasOwnProperty('method')) {\n if (!Array.isArray(message.method))\n return 'method: array expected';\n for (let i = 0; i < message.method.length; ++i) {\n let error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]);\n if (error)\n return 'method.' + error;\n }\n }\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.ServiceOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n return null;\n };\n\n /**\n * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto\n */\n ServiceDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.ServiceDescriptorProto)\n return object;\n let message = new $root.google.protobuf.ServiceDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.method) {\n if (!Array.isArray(object.method))\n throw TypeError('.google.protobuf.ServiceDescriptorProto.method: array expected');\n message.method = [];\n for (let i = 0; i < object.method.length; ++i) {\n if (typeof object.method[i] !== 'object')\n throw TypeError('.google.protobuf.ServiceDescriptorProto.method: object expected');\n message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]);\n }\n }\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.ServiceDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.ServiceDescriptorProto\n * @static\n * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ServiceDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.method = [];\n if (options.defaults) {\n object.name = '';\n object.options = null;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.method && message.method.length) {\n object.method = [];\n for (let j = 0; j < message.method.length; ++j)\n object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);\n }\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);\n return object;\n };\n\n /**\n * Converts this ServiceDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.ServiceDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n ServiceDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ServiceDescriptorProto;\n })();\n\n protobuf.MethodDescriptorProto = (function () {\n\n /**\n * Properties of a MethodDescriptorProto.\n * @memberof google.protobuf\n * @interface IMethodDescriptorProto\n * @property {string|null} [name] MethodDescriptorProto name\n * @property {string|null} [inputType] MethodDescriptorProto inputType\n * @property {string|null} [outputType] MethodDescriptorProto outputType\n * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options\n * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming\n * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming\n */\n\n /**\n * Constructs a new MethodDescriptorProto.\n * @memberof google.protobuf\n * @classdesc Represents a MethodDescriptorProto.\n * @implements IMethodDescriptorProto\n * @constructor\n * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set\n */\n function MethodDescriptorProto(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * MethodDescriptorProto name.\n * @member {string} name\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.name = '';\n\n /**\n * MethodDescriptorProto inputType.\n * @member {string} inputType\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.inputType = '';\n\n /**\n * MethodDescriptorProto outputType.\n * @member {string} outputType\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.outputType = '';\n\n /**\n * MethodDescriptorProto options.\n * @member {google.protobuf.IMethodOptions|null|undefined} options\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.options = null;\n\n /**\n * MethodDescriptorProto clientStreaming.\n * @member {boolean} clientStreaming\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.clientStreaming = false;\n\n /**\n * MethodDescriptorProto serverStreaming.\n * @member {boolean} serverStreaming\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n */\n MethodDescriptorProto.prototype.serverStreaming = false;\n\n /**\n * Creates a new MethodDescriptorProto instance using the specified properties.\n * @function create\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set\n * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance\n */\n MethodDescriptorProto.create = function create(properties) {\n return new MethodDescriptorProto(properties);\n };\n\n /**\n * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MethodDescriptorProto.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.hasOwnProperty('name'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);\n if (message.inputType != null && message.hasOwnProperty('inputType'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType);\n if (message.outputType != null && message.hasOwnProperty('outputType'))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType);\n if (message.options != null && message.hasOwnProperty('options'))\n $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();\n if (message.clientStreaming != null && message.hasOwnProperty('clientStreaming'))\n writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming);\n if (message.serverStreaming != null && message.hasOwnProperty('serverStreaming'))\n writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming);\n return writer;\n };\n\n /**\n * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a MethodDescriptorProto message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MethodDescriptorProto.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.string();\n break;\n case 2:\n message.inputType = reader.string();\n break;\n case 3:\n message.outputType = reader.string();\n break;\n case 4:\n message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32());\n break;\n case 5:\n message.clientStreaming = reader.bool();\n break;\n case 6:\n message.serverStreaming = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a MethodDescriptorProto message.\n * @function verify\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n MethodDescriptorProto.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name'))\n if (!$util.isString(message.name))\n return 'name: string expected';\n if (message.inputType != null && message.hasOwnProperty('inputType'))\n if (!$util.isString(message.inputType))\n return 'inputType: string expected';\n if (message.outputType != null && message.hasOwnProperty('outputType'))\n if (!$util.isString(message.outputType))\n return 'outputType: string expected';\n if (message.options != null && message.hasOwnProperty('options')) {\n let error = $root.google.protobuf.MethodOptions.verify(message.options);\n if (error)\n return 'options.' + error;\n }\n if (message.clientStreaming != null && message.hasOwnProperty('clientStreaming'))\n if (typeof message.clientStreaming !== 'boolean')\n return 'clientStreaming: boolean expected';\n if (message.serverStreaming != null && message.hasOwnProperty('serverStreaming'))\n if (typeof message.serverStreaming !== 'boolean')\n return 'serverStreaming: boolean expected';\n return null;\n };\n\n /**\n * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto\n */\n MethodDescriptorProto.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.MethodDescriptorProto)\n return object;\n let message = new $root.google.protobuf.MethodDescriptorProto();\n if (object.name != null)\n message.name = String(object.name);\n if (object.inputType != null)\n message.inputType = String(object.inputType);\n if (object.outputType != null)\n message.outputType = String(object.outputType);\n if (object.options != null) {\n if (typeof object.options !== 'object')\n throw TypeError('.google.protobuf.MethodDescriptorProto.options: object expected');\n message.options = $root.google.protobuf.MethodOptions.fromObject(object.options);\n }\n if (object.clientStreaming != null)\n message.clientStreaming = Boolean(object.clientStreaming);\n if (object.serverStreaming != null)\n message.serverStreaming = Boolean(object.serverStreaming);\n return message;\n };\n\n /**\n * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.MethodDescriptorProto\n * @static\n * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n MethodDescriptorProto.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.name = '';\n object.inputType = '';\n object.outputType = '';\n object.options = null;\n object.clientStreaming = false;\n object.serverStreaming = false;\n }\n if (message.name != null && message.hasOwnProperty('name'))\n object.name = message.name;\n if (message.inputType != null && message.hasOwnProperty('inputType'))\n object.inputType = message.inputType;\n if (message.outputType != null && message.hasOwnProperty('outputType'))\n object.outputType = message.outputType;\n if (message.options != null && message.hasOwnProperty('options'))\n object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options);\n if (message.clientStreaming != null && message.hasOwnProperty('clientStreaming'))\n object.clientStreaming = message.clientStreaming;\n if (message.serverStreaming != null && message.hasOwnProperty('serverStreaming'))\n object.serverStreaming = message.serverStreaming;\n return object;\n };\n\n /**\n * Converts this MethodDescriptorProto to JSON.\n * @function toJSON\n * @memberof google.protobuf.MethodDescriptorProto\n * @instance\n * @returns {Object.} JSON object\n */\n MethodDescriptorProto.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return MethodDescriptorProto;\n })();\n\n protobuf.FileOptions = (function () {\n\n /**\n * Properties of a FileOptions.\n * @memberof google.protobuf\n * @interface IFileOptions\n * @property {string|null} [javaPackage] FileOptions javaPackage\n * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname\n * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles\n * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash\n * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8\n * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor\n * @property {string|null} [goPackage] FileOptions goPackage\n * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices\n * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices\n * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices\n * @property {boolean|null} [deprecated] FileOptions deprecated\n * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas\n * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix\n * @property {string|null} [csharpNamespace] FileOptions csharpNamespace\n * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption\n */\n\n /**\n * Constructs a new FileOptions.\n * @memberof google.protobuf\n * @classdesc Represents a FileOptions.\n * @implements IFileOptions\n * @constructor\n * @param {google.protobuf.IFileOptions=} [properties] Properties to set\n */\n function FileOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * FileOptions javaPackage.\n * @member {string} javaPackage\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaPackage = '';\n\n /**\n * FileOptions javaOuterClassname.\n * @member {string} javaOuterClassname\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaOuterClassname = '';\n\n /**\n * FileOptions javaMultipleFiles.\n * @member {boolean} javaMultipleFiles\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaMultipleFiles = false;\n\n /**\n * FileOptions javaGenerateEqualsAndHash.\n * @member {boolean} javaGenerateEqualsAndHash\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaGenerateEqualsAndHash = false;\n\n /**\n * FileOptions javaStringCheckUtf8.\n * @member {boolean} javaStringCheckUtf8\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaStringCheckUtf8 = false;\n\n /**\n * FileOptions optimizeFor.\n * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.optimizeFor = 1;\n\n /**\n * FileOptions goPackage.\n * @member {string} goPackage\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.goPackage = '';\n\n /**\n * FileOptions ccGenericServices.\n * @member {boolean} ccGenericServices\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.ccGenericServices = false;\n\n /**\n * FileOptions javaGenericServices.\n * @member {boolean} javaGenericServices\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.javaGenericServices = false;\n\n /**\n * FileOptions pyGenericServices.\n * @member {boolean} pyGenericServices\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.pyGenericServices = false;\n\n /**\n * FileOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.deprecated = false;\n\n /**\n * FileOptions ccEnableArenas.\n * @member {boolean} ccEnableArenas\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.ccEnableArenas = false;\n\n /**\n * FileOptions objcClassPrefix.\n * @member {string} objcClassPrefix\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.objcClassPrefix = '';\n\n /**\n * FileOptions csharpNamespace.\n * @member {string} csharpNamespace\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.csharpNamespace = '';\n\n /**\n * FileOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.FileOptions\n * @instance\n */\n FileOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new FileOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {google.protobuf.IFileOptions=} [properties] Properties to set\n * @returns {google.protobuf.FileOptions} FileOptions instance\n */\n FileOptions.create = function create(properties) {\n return new FileOptions(properties);\n };\n\n /**\n * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.javaPackage != null && message.hasOwnProperty('javaPackage'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage);\n if (message.javaOuterClassname != null && message.hasOwnProperty('javaOuterClassname'))\n writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname);\n if (message.optimizeFor != null && message.hasOwnProperty('optimizeFor'))\n writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor);\n if (message.javaMultipleFiles != null && message.hasOwnProperty('javaMultipleFiles'))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles);\n if (message.goPackage != null && message.hasOwnProperty('goPackage'))\n writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage);\n if (message.ccGenericServices != null && message.hasOwnProperty('ccGenericServices'))\n writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices);\n if (message.javaGenericServices != null && message.hasOwnProperty('javaGenericServices'))\n writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices);\n if (message.pyGenericServices != null && message.hasOwnProperty('pyGenericServices'))\n writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices);\n if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty('javaGenerateEqualsAndHash'))\n writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash);\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated);\n if (message.javaStringCheckUtf8 != null && message.hasOwnProperty('javaStringCheckUtf8'))\n writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8);\n if (message.ccEnableArenas != null && message.hasOwnProperty('ccEnableArenas'))\n writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas);\n if (message.objcClassPrefix != null && message.hasOwnProperty('objcClassPrefix'))\n writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix);\n if (message.csharpNamespace != null && message.hasOwnProperty('csharpNamespace'))\n writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FileOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FileOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.FileOptions} FileOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.javaPackage = reader.string();\n break;\n case 8:\n message.javaOuterClassname = reader.string();\n break;\n case 10:\n message.javaMultipleFiles = reader.bool();\n break;\n case 20:\n message.javaGenerateEqualsAndHash = reader.bool();\n break;\n case 27:\n message.javaStringCheckUtf8 = reader.bool();\n break;\n case 9:\n message.optimizeFor = reader.int32();\n break;\n case 11:\n message.goPackage = reader.string();\n break;\n case 16:\n message.ccGenericServices = reader.bool();\n break;\n case 17:\n message.javaGenericServices = reader.bool();\n break;\n case 18:\n message.pyGenericServices = reader.bool();\n break;\n case 23:\n message.deprecated = reader.bool();\n break;\n case 31:\n message.ccEnableArenas = reader.bool();\n break;\n case 36:\n message.objcClassPrefix = reader.string();\n break;\n case 37:\n message.csharpNamespace = reader.string();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a FileOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.FileOptions} FileOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FileOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a FileOptions message.\n * @function verify\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n FileOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.javaPackage != null && message.hasOwnProperty('javaPackage'))\n if (!$util.isString(message.javaPackage))\n return 'javaPackage: string expected';\n if (message.javaOuterClassname != null && message.hasOwnProperty('javaOuterClassname'))\n if (!$util.isString(message.javaOuterClassname))\n return 'javaOuterClassname: string expected';\n if (message.javaMultipleFiles != null && message.hasOwnProperty('javaMultipleFiles'))\n if (typeof message.javaMultipleFiles !== 'boolean')\n return 'javaMultipleFiles: boolean expected';\n if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty('javaGenerateEqualsAndHash'))\n if (typeof message.javaGenerateEqualsAndHash !== 'boolean')\n return 'javaGenerateEqualsAndHash: boolean expected';\n if (message.javaStringCheckUtf8 != null && message.hasOwnProperty('javaStringCheckUtf8'))\n if (typeof message.javaStringCheckUtf8 !== 'boolean')\n return 'javaStringCheckUtf8: boolean expected';\n if (message.optimizeFor != null && message.hasOwnProperty('optimizeFor'))\n switch (message.optimizeFor) {\n default:\n return 'optimizeFor: enum value expected';\n case 1:\n case 2:\n case 3:\n break;\n }\n if (message.goPackage != null && message.hasOwnProperty('goPackage'))\n if (!$util.isString(message.goPackage))\n return 'goPackage: string expected';\n if (message.ccGenericServices != null && message.hasOwnProperty('ccGenericServices'))\n if (typeof message.ccGenericServices !== 'boolean')\n return 'ccGenericServices: boolean expected';\n if (message.javaGenericServices != null && message.hasOwnProperty('javaGenericServices'))\n if (typeof message.javaGenericServices !== 'boolean')\n return 'javaGenericServices: boolean expected';\n if (message.pyGenericServices != null && message.hasOwnProperty('pyGenericServices'))\n if (typeof message.pyGenericServices !== 'boolean')\n return 'pyGenericServices: boolean expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.ccEnableArenas != null && message.hasOwnProperty('ccEnableArenas'))\n if (typeof message.ccEnableArenas !== 'boolean')\n return 'ccEnableArenas: boolean expected';\n if (message.objcClassPrefix != null && message.hasOwnProperty('objcClassPrefix'))\n if (!$util.isString(message.objcClassPrefix))\n return 'objcClassPrefix: string expected';\n if (message.csharpNamespace != null && message.hasOwnProperty('csharpNamespace'))\n if (!$util.isString(message.csharpNamespace))\n return 'csharpNamespace: string expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.FileOptions} FileOptions\n */\n FileOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.FileOptions)\n return object;\n let message = new $root.google.protobuf.FileOptions();\n if (object.javaPackage != null)\n message.javaPackage = String(object.javaPackage);\n if (object.javaOuterClassname != null)\n message.javaOuterClassname = String(object.javaOuterClassname);\n if (object.javaMultipleFiles != null)\n message.javaMultipleFiles = Boolean(object.javaMultipleFiles);\n if (object.javaGenerateEqualsAndHash != null)\n message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash);\n if (object.javaStringCheckUtf8 != null)\n message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8);\n switch (object.optimizeFor) {\n case 'SPEED':\n case 1:\n message.optimizeFor = 1;\n break;\n case 'CODE_SIZE':\n case 2:\n message.optimizeFor = 2;\n break;\n case 'LITE_RUNTIME':\n case 3:\n message.optimizeFor = 3;\n break;\n }\n if (object.goPackage != null)\n message.goPackage = String(object.goPackage);\n if (object.ccGenericServices != null)\n message.ccGenericServices = Boolean(object.ccGenericServices);\n if (object.javaGenericServices != null)\n message.javaGenericServices = Boolean(object.javaGenericServices);\n if (object.pyGenericServices != null)\n message.pyGenericServices = Boolean(object.pyGenericServices);\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.ccEnableArenas != null)\n message.ccEnableArenas = Boolean(object.ccEnableArenas);\n if (object.objcClassPrefix != null)\n message.objcClassPrefix = String(object.objcClassPrefix);\n if (object.csharpNamespace != null)\n message.csharpNamespace = String(object.csharpNamespace);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.FileOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.FileOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a FileOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.FileOptions\n * @static\n * @param {google.protobuf.FileOptions} message FileOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n FileOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults) {\n object.javaPackage = '';\n object.javaOuterClassname = '';\n object.optimizeFor = options.enums === String ? 'SPEED' : 1;\n object.javaMultipleFiles = false;\n object.goPackage = '';\n object.ccGenericServices = false;\n object.javaGenericServices = false;\n object.pyGenericServices = false;\n object.javaGenerateEqualsAndHash = false;\n object.deprecated = false;\n object.javaStringCheckUtf8 = false;\n object.ccEnableArenas = false;\n object.objcClassPrefix = '';\n object.csharpNamespace = '';\n }\n if (message.javaPackage != null && message.hasOwnProperty('javaPackage'))\n object.javaPackage = message.javaPackage;\n if (message.javaOuterClassname != null && message.hasOwnProperty('javaOuterClassname'))\n object.javaOuterClassname = message.javaOuterClassname;\n if (message.optimizeFor != null && message.hasOwnProperty('optimizeFor'))\n object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor;\n if (message.javaMultipleFiles != null && message.hasOwnProperty('javaMultipleFiles'))\n object.javaMultipleFiles = message.javaMultipleFiles;\n if (message.goPackage != null && message.hasOwnProperty('goPackage'))\n object.goPackage = message.goPackage;\n if (message.ccGenericServices != null && message.hasOwnProperty('ccGenericServices'))\n object.ccGenericServices = message.ccGenericServices;\n if (message.javaGenericServices != null && message.hasOwnProperty('javaGenericServices'))\n object.javaGenericServices = message.javaGenericServices;\n if (message.pyGenericServices != null && message.hasOwnProperty('pyGenericServices'))\n object.pyGenericServices = message.pyGenericServices;\n if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty('javaGenerateEqualsAndHash'))\n object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.javaStringCheckUtf8 != null && message.hasOwnProperty('javaStringCheckUtf8'))\n object.javaStringCheckUtf8 = message.javaStringCheckUtf8;\n if (message.ccEnableArenas != null && message.hasOwnProperty('ccEnableArenas'))\n object.ccEnableArenas = message.ccEnableArenas;\n if (message.objcClassPrefix != null && message.hasOwnProperty('objcClassPrefix'))\n object.objcClassPrefix = message.objcClassPrefix;\n if (message.csharpNamespace != null && message.hasOwnProperty('csharpNamespace'))\n object.csharpNamespace = message.csharpNamespace;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this FileOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.FileOptions\n * @instance\n * @returns {Object.} JSON object\n */\n FileOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n /**\n * OptimizeMode enum.\n * @name google.protobuf.FileOptions.OptimizeMode\n * @enum {string}\n * @property {number} SPEED=1 SPEED value\n * @property {number} CODE_SIZE=2 CODE_SIZE value\n * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value\n */\n FileOptions.OptimizeMode = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[1] = 'SPEED'] = 1;\n values[valuesById[2] = 'CODE_SIZE'] = 2;\n values[valuesById[3] = 'LITE_RUNTIME'] = 3;\n return values;\n })();\n\n return FileOptions;\n })();\n\n protobuf.MessageOptions = (function () {\n\n /**\n * Properties of a MessageOptions.\n * @memberof google.protobuf\n * @interface IMessageOptions\n * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat\n * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor\n * @property {boolean|null} [deprecated] MessageOptions deprecated\n * @property {boolean|null} [mapEntry] MessageOptions mapEntry\n * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption\n */\n\n /**\n * Constructs a new MessageOptions.\n * @memberof google.protobuf\n * @classdesc Represents a MessageOptions.\n * @implements IMessageOptions\n * @constructor\n * @param {google.protobuf.IMessageOptions=} [properties] Properties to set\n */\n function MessageOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * MessageOptions messageSetWireFormat.\n * @member {boolean} messageSetWireFormat\n * @memberof google.protobuf.MessageOptions\n * @instance\n */\n MessageOptions.prototype.messageSetWireFormat = false;\n\n /**\n * MessageOptions noStandardDescriptorAccessor.\n * @member {boolean} noStandardDescriptorAccessor\n * @memberof google.protobuf.MessageOptions\n * @instance\n */\n MessageOptions.prototype.noStandardDescriptorAccessor = false;\n\n /**\n * MessageOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.MessageOptions\n * @instance\n */\n MessageOptions.prototype.deprecated = false;\n\n /**\n * MessageOptions mapEntry.\n * @member {boolean} mapEntry\n * @memberof google.protobuf.MessageOptions\n * @instance\n */\n MessageOptions.prototype.mapEntry = false;\n\n /**\n * MessageOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.MessageOptions\n * @instance\n */\n MessageOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new MessageOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {google.protobuf.IMessageOptions=} [properties] Properties to set\n * @returns {google.protobuf.MessageOptions} MessageOptions instance\n */\n MessageOptions.create = function create(properties) {\n return new MessageOptions(properties);\n };\n\n /**\n * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MessageOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.messageSetWireFormat != null && message.hasOwnProperty('messageSetWireFormat'))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat);\n if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty('noStandardDescriptorAccessor'))\n writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor);\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);\n if (message.mapEntry != null && message.hasOwnProperty('mapEntry'))\n writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MessageOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a MessageOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.MessageOptions} MessageOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MessageOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.messageSetWireFormat = reader.bool();\n break;\n case 2:\n message.noStandardDescriptorAccessor = reader.bool();\n break;\n case 3:\n message.deprecated = reader.bool();\n break;\n case 7:\n message.mapEntry = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a MessageOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.MessageOptions} MessageOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MessageOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a MessageOptions message.\n * @function verify\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n MessageOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.messageSetWireFormat != null && message.hasOwnProperty('messageSetWireFormat'))\n if (typeof message.messageSetWireFormat !== 'boolean')\n return 'messageSetWireFormat: boolean expected';\n if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty('noStandardDescriptorAccessor'))\n if (typeof message.noStandardDescriptorAccessor !== 'boolean')\n return 'noStandardDescriptorAccessor: boolean expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.mapEntry != null && message.hasOwnProperty('mapEntry'))\n if (typeof message.mapEntry !== 'boolean')\n return 'mapEntry: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.MessageOptions} MessageOptions\n */\n MessageOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.MessageOptions)\n return object;\n let message = new $root.google.protobuf.MessageOptions();\n if (object.messageSetWireFormat != null)\n message.messageSetWireFormat = Boolean(object.messageSetWireFormat);\n if (object.noStandardDescriptorAccessor != null)\n message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor);\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.mapEntry != null)\n message.mapEntry = Boolean(object.mapEntry);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.MessageOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.MessageOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.MessageOptions\n * @static\n * @param {google.protobuf.MessageOptions} message MessageOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n MessageOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults) {\n object.messageSetWireFormat = false;\n object.noStandardDescriptorAccessor = false;\n object.deprecated = false;\n object.mapEntry = false;\n }\n if (message.messageSetWireFormat != null && message.hasOwnProperty('messageSetWireFormat'))\n object.messageSetWireFormat = message.messageSetWireFormat;\n if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty('noStandardDescriptorAccessor'))\n object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.mapEntry != null && message.hasOwnProperty('mapEntry'))\n object.mapEntry = message.mapEntry;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this MessageOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.MessageOptions\n * @instance\n * @returns {Object.} JSON object\n */\n MessageOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return MessageOptions;\n })();\n\n protobuf.FieldOptions = (function () {\n\n /**\n * Properties of a FieldOptions.\n * @memberof google.protobuf\n * @interface IFieldOptions\n * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype\n * @property {boolean|null} [packed] FieldOptions packed\n * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype\n * @property {boolean|null} [lazy] FieldOptions lazy\n * @property {boolean|null} [deprecated] FieldOptions deprecated\n * @property {boolean|null} [weak] FieldOptions weak\n * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption\n */\n\n /**\n * Constructs a new FieldOptions.\n * @memberof google.protobuf\n * @classdesc Represents a FieldOptions.\n * @implements IFieldOptions\n * @constructor\n * @param {google.protobuf.IFieldOptions=} [properties] Properties to set\n */\n function FieldOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * FieldOptions ctype.\n * @member {google.protobuf.FieldOptions.CType} ctype\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.ctype = 0;\n\n /**\n * FieldOptions packed.\n * @member {boolean} packed\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.packed = false;\n\n /**\n * FieldOptions jstype.\n * @member {google.protobuf.FieldOptions.JSType} jstype\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.jstype = 0;\n\n /**\n * FieldOptions lazy.\n * @member {boolean} lazy\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.lazy = false;\n\n /**\n * FieldOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.deprecated = false;\n\n /**\n * FieldOptions weak.\n * @member {boolean} weak\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.weak = false;\n\n /**\n * FieldOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.FieldOptions\n * @instance\n */\n FieldOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new FieldOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {google.protobuf.IFieldOptions=} [properties] Properties to set\n * @returns {google.protobuf.FieldOptions} FieldOptions instance\n */\n FieldOptions.create = function create(properties) {\n return new FieldOptions(properties);\n };\n\n /**\n * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FieldOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.ctype != null && message.hasOwnProperty('ctype'))\n writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype);\n if (message.packed != null && message.hasOwnProperty('packed'))\n writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);\n if (message.lazy != null && message.hasOwnProperty('lazy'))\n writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy);\n if (message.jstype != null && message.hasOwnProperty('jstype'))\n writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);\n if (message.weak != null && message.hasOwnProperty('weak'))\n writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FieldOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FieldOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.FieldOptions} FieldOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FieldOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.ctype = reader.int32();\n break;\n case 2:\n message.packed = reader.bool();\n break;\n case 6:\n message.jstype = reader.int32();\n break;\n case 5:\n message.lazy = reader.bool();\n break;\n case 3:\n message.deprecated = reader.bool();\n break;\n case 10:\n message.weak = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a FieldOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.FieldOptions} FieldOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FieldOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a FieldOptions message.\n * @function verify\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n FieldOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.ctype != null && message.hasOwnProperty('ctype'))\n switch (message.ctype) {\n default:\n return 'ctype: enum value expected';\n case 0:\n case 1:\n case 2:\n break;\n }\n if (message.packed != null && message.hasOwnProperty('packed'))\n if (typeof message.packed !== 'boolean')\n return 'packed: boolean expected';\n if (message.jstype != null && message.hasOwnProperty('jstype'))\n switch (message.jstype) {\n default:\n return 'jstype: enum value expected';\n case 0:\n case 1:\n case 2:\n break;\n }\n if (message.lazy != null && message.hasOwnProperty('lazy'))\n if (typeof message.lazy !== 'boolean')\n return 'lazy: boolean expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.weak != null && message.hasOwnProperty('weak'))\n if (typeof message.weak !== 'boolean')\n return 'weak: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.FieldOptions} FieldOptions\n */\n FieldOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.FieldOptions)\n return object;\n let message = new $root.google.protobuf.FieldOptions();\n switch (object.ctype) {\n case 'STRING':\n case 0:\n message.ctype = 0;\n break;\n case 'CORD':\n case 1:\n message.ctype = 1;\n break;\n case 'STRING_PIECE':\n case 2:\n message.ctype = 2;\n break;\n }\n if (object.packed != null)\n message.packed = Boolean(object.packed);\n switch (object.jstype) {\n case 'JS_NORMAL':\n case 0:\n message.jstype = 0;\n break;\n case 'JS_STRING':\n case 1:\n message.jstype = 1;\n break;\n case 'JS_NUMBER':\n case 2:\n message.jstype = 2;\n break;\n }\n if (object.lazy != null)\n message.lazy = Boolean(object.lazy);\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.weak != null)\n message.weak = Boolean(object.weak);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.FieldOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.FieldOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.FieldOptions\n * @static\n * @param {google.protobuf.FieldOptions} message FieldOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n FieldOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults) {\n object.ctype = options.enums === String ? 'STRING' : 0;\n object.packed = false;\n object.deprecated = false;\n object.lazy = false;\n object.jstype = options.enums === String ? 'JS_NORMAL' : 0;\n object.weak = false;\n }\n if (message.ctype != null && message.hasOwnProperty('ctype'))\n object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;\n if (message.packed != null && message.hasOwnProperty('packed'))\n object.packed = message.packed;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.lazy != null && message.hasOwnProperty('lazy'))\n object.lazy = message.lazy;\n if (message.jstype != null && message.hasOwnProperty('jstype'))\n object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;\n if (message.weak != null && message.hasOwnProperty('weak'))\n object.weak = message.weak;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this FieldOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.FieldOptions\n * @instance\n * @returns {Object.} JSON object\n */\n FieldOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n /**\n * CType enum.\n * @name google.protobuf.FieldOptions.CType\n * @enum {string}\n * @property {number} STRING=0 STRING value\n * @property {number} CORD=1 CORD value\n * @property {number} STRING_PIECE=2 STRING_PIECE value\n */\n FieldOptions.CType = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = 'STRING'] = 0;\n values[valuesById[1] = 'CORD'] = 1;\n values[valuesById[2] = 'STRING_PIECE'] = 2;\n return values;\n })();\n\n /**\n * JSType enum.\n * @name google.protobuf.FieldOptions.JSType\n * @enum {string}\n * @property {number} JS_NORMAL=0 JS_NORMAL value\n * @property {number} JS_STRING=1 JS_STRING value\n * @property {number} JS_NUMBER=2 JS_NUMBER value\n */\n FieldOptions.JSType = (function () {\n const valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = 'JS_NORMAL'] = 0;\n values[valuesById[1] = 'JS_STRING'] = 1;\n values[valuesById[2] = 'JS_NUMBER'] = 2;\n return values;\n })();\n\n return FieldOptions;\n })();\n\n protobuf.OneofOptions = (function () {\n\n /**\n * Properties of an OneofOptions.\n * @memberof google.protobuf\n * @interface IOneofOptions\n * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption\n */\n\n /**\n * Constructs a new OneofOptions.\n * @memberof google.protobuf\n * @classdesc Represents an OneofOptions.\n * @implements IOneofOptions\n * @constructor\n * @param {google.protobuf.IOneofOptions=} [properties] Properties to set\n */\n function OneofOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * OneofOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.OneofOptions\n * @instance\n */\n OneofOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new OneofOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {google.protobuf.IOneofOptions=} [properties] Properties to set\n * @returns {google.protobuf.OneofOptions} OneofOptions instance\n */\n OneofOptions.create = function create(properties) {\n return new OneofOptions(properties);\n };\n\n /**\n * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n OneofOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an OneofOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.OneofOptions} OneofOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n OneofOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an OneofOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.OneofOptions} OneofOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n OneofOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an OneofOptions message.\n * @function verify\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n OneofOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.OneofOptions} OneofOptions\n */\n OneofOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.OneofOptions)\n return object;\n let message = new $root.google.protobuf.OneofOptions();\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.OneofOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.OneofOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.OneofOptions\n * @static\n * @param {google.protobuf.OneofOptions} message OneofOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n OneofOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this OneofOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.OneofOptions\n * @instance\n * @returns {Object.} JSON object\n */\n OneofOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return OneofOptions;\n })();\n\n protobuf.EnumOptions = (function () {\n\n /**\n * Properties of an EnumOptions.\n * @memberof google.protobuf\n * @interface IEnumOptions\n * @property {boolean|null} [allowAlias] EnumOptions allowAlias\n * @property {boolean|null} [deprecated] EnumOptions deprecated\n * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption\n */\n\n /**\n * Constructs a new EnumOptions.\n * @memberof google.protobuf\n * @classdesc Represents an EnumOptions.\n * @implements IEnumOptions\n * @constructor\n * @param {google.protobuf.IEnumOptions=} [properties] Properties to set\n */\n function EnumOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EnumOptions allowAlias.\n * @member {boolean} allowAlias\n * @memberof google.protobuf.EnumOptions\n * @instance\n */\n EnumOptions.prototype.allowAlias = false;\n\n /**\n * EnumOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.EnumOptions\n * @instance\n */\n EnumOptions.prototype.deprecated = false;\n\n /**\n * EnumOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.EnumOptions\n * @instance\n */\n EnumOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new EnumOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {google.protobuf.IEnumOptions=} [properties] Properties to set\n * @returns {google.protobuf.EnumOptions} EnumOptions instance\n */\n EnumOptions.create = function create(properties) {\n return new EnumOptions(properties);\n };\n\n /**\n * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.allowAlias != null && message.hasOwnProperty('allowAlias'))\n writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias);\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EnumOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.EnumOptions} EnumOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n message.allowAlias = reader.bool();\n break;\n case 3:\n message.deprecated = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EnumOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.EnumOptions} EnumOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EnumOptions message.\n * @function verify\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EnumOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.allowAlias != null && message.hasOwnProperty('allowAlias'))\n if (typeof message.allowAlias !== 'boolean')\n return 'allowAlias: boolean expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.EnumOptions} EnumOptions\n */\n EnumOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.EnumOptions)\n return object;\n let message = new $root.google.protobuf.EnumOptions();\n if (object.allowAlias != null)\n message.allowAlias = Boolean(object.allowAlias);\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.EnumOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.EnumOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.EnumOptions\n * @static\n * @param {google.protobuf.EnumOptions} message EnumOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n EnumOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults) {\n object.allowAlias = false;\n object.deprecated = false;\n }\n if (message.allowAlias != null && message.hasOwnProperty('allowAlias'))\n object.allowAlias = message.allowAlias;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this EnumOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.EnumOptions\n * @instance\n * @returns {Object.} JSON object\n */\n EnumOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return EnumOptions;\n })();\n\n protobuf.EnumValueOptions = (function () {\n\n /**\n * Properties of an EnumValueOptions.\n * @memberof google.protobuf\n * @interface IEnumValueOptions\n * @property {boolean|null} [deprecated] EnumValueOptions deprecated\n * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption\n */\n\n /**\n * Constructs a new EnumValueOptions.\n * @memberof google.protobuf\n * @classdesc Represents an EnumValueOptions.\n * @implements IEnumValueOptions\n * @constructor\n * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set\n */\n function EnumValueOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * EnumValueOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.EnumValueOptions\n * @instance\n */\n EnumValueOptions.prototype.deprecated = false;\n\n /**\n * EnumValueOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.EnumValueOptions\n * @instance\n */\n EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new EnumValueOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set\n * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance\n */\n EnumValueOptions.create = function create(properties) {\n return new EnumValueOptions(properties);\n };\n\n /**\n * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumValueOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EnumValueOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.EnumValueOptions} EnumValueOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumValueOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.deprecated = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.EnumValueOptions} EnumValueOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EnumValueOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an EnumValueOptions message.\n * @function verify\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n EnumValueOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.EnumValueOptions} EnumValueOptions\n */\n EnumValueOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.EnumValueOptions)\n return object;\n let message = new $root.google.protobuf.EnumValueOptions();\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.EnumValueOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.EnumValueOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.EnumValueOptions\n * @static\n * @param {google.protobuf.EnumValueOptions} message EnumValueOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n EnumValueOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults)\n object.deprecated = false;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this EnumValueOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.EnumValueOptions\n * @instance\n * @returns {Object.} JSON object\n */\n EnumValueOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return EnumValueOptions;\n })();\n\n protobuf.ServiceOptions = (function () {\n\n /**\n * Properties of a ServiceOptions.\n * @memberof google.protobuf\n * @interface IServiceOptions\n * @property {boolean|null} [deprecated] ServiceOptions deprecated\n * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption\n */\n\n /**\n * Constructs a new ServiceOptions.\n * @memberof google.protobuf\n * @classdesc Represents a ServiceOptions.\n * @implements IServiceOptions\n * @constructor\n * @param {google.protobuf.IServiceOptions=} [properties] Properties to set\n */\n function ServiceOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * ServiceOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.ServiceOptions\n * @instance\n */\n ServiceOptions.prototype.deprecated = false;\n\n /**\n * ServiceOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.ServiceOptions\n * @instance\n */\n ServiceOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * Creates a new ServiceOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {google.protobuf.IServiceOptions=} [properties] Properties to set\n * @returns {google.protobuf.ServiceOptions} ServiceOptions instance\n */\n ServiceOptions.create = function create(properties) {\n return new ServiceOptions(properties);\n };\n\n /**\n * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ServiceOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ServiceOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.ServiceOptions} ServiceOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ServiceOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 33:\n message.deprecated = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.ServiceOptions} ServiceOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ServiceOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a ServiceOptions message.\n * @function verify\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ServiceOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.ServiceOptions} ServiceOptions\n */\n ServiceOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.ServiceOptions)\n return object;\n let message = new $root.google.protobuf.ServiceOptions();\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.ServiceOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.ServiceOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.ServiceOptions\n * @static\n * @param {google.protobuf.ServiceOptions} message ServiceOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ServiceOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults)\n object.deprecated = false;\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n return object;\n };\n\n /**\n * Converts this ServiceOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.ServiceOptions\n * @instance\n * @returns {Object.} JSON object\n */\n ServiceOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return ServiceOptions;\n })();\n\n protobuf.MethodOptions = (function () {\n\n /**\n * Properties of a MethodOptions.\n * @memberof google.protobuf\n * @interface IMethodOptions\n * @property {boolean|null} [deprecated] MethodOptions deprecated\n * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption\n * @property {google.api.IHttpRule|null} [\".google.api.http\"] MethodOptions .google.api.http\n */\n\n /**\n * Constructs a new MethodOptions.\n * @memberof google.protobuf\n * @classdesc Represents a MethodOptions.\n * @implements IMethodOptions\n * @constructor\n * @param {google.protobuf.IMethodOptions=} [properties] Properties to set\n */\n function MethodOptions(properties) {\n this.uninterpretedOption = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * MethodOptions deprecated.\n * @member {boolean} deprecated\n * @memberof google.protobuf.MethodOptions\n * @instance\n */\n MethodOptions.prototype.deprecated = false;\n\n /**\n * MethodOptions uninterpretedOption.\n * @member {Array.} uninterpretedOption\n * @memberof google.protobuf.MethodOptions\n * @instance\n */\n MethodOptions.prototype.uninterpretedOption = $util.emptyArray;\n\n /**\n * MethodOptions .google.api.http.\n * @member {google.api.IHttpRule|null|undefined} .google.api.http\n * @memberof google.protobuf.MethodOptions\n * @instance\n */\n MethodOptions.prototype['.google.api.http'] = null;\n\n /**\n * Creates a new MethodOptions instance using the specified properties.\n * @function create\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {google.protobuf.IMethodOptions=} [properties] Properties to set\n * @returns {google.protobuf.MethodOptions} MethodOptions instance\n */\n MethodOptions.create = function create(properties) {\n return new MethodOptions(properties);\n };\n\n /**\n * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MethodOptions.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);\n if (message.uninterpretedOption != null && message.uninterpretedOption.length)\n for (let i = 0; i < message.uninterpretedOption.length; ++i)\n $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();\n if (message['.google.api.http'] != null && message.hasOwnProperty('.google.api.http'))\n $root.google.api.HttpRule.encode(message['.google.api.http'], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MethodOptions.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a MethodOptions message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.MethodOptions} MethodOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MethodOptions.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 33:\n message.deprecated = reader.bool();\n break;\n case 999:\n if (!(message.uninterpretedOption && message.uninterpretedOption.length))\n message.uninterpretedOption = [];\n message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));\n break;\n case 72295728:\n message['.google.api.http'] = $root.google.api.HttpRule.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a MethodOptions message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.MethodOptions} MethodOptions\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MethodOptions.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a MethodOptions message.\n * @function verify\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n MethodOptions.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n if (typeof message.deprecated !== 'boolean')\n return 'deprecated: boolean expected';\n if (message.uninterpretedOption != null && message.hasOwnProperty('uninterpretedOption')) {\n if (!Array.isArray(message.uninterpretedOption))\n return 'uninterpretedOption: array expected';\n for (let i = 0; i < message.uninterpretedOption.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);\n if (error)\n return 'uninterpretedOption.' + error;\n }\n }\n if (message['.google.api.http'] != null && message.hasOwnProperty('.google.api.http')) {\n let error = $root.google.api.HttpRule.verify(message['.google.api.http']);\n if (error)\n return '.google.api.http.' + error;\n }\n return null;\n };\n\n /**\n * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.MethodOptions} MethodOptions\n */\n MethodOptions.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.MethodOptions)\n return object;\n let message = new $root.google.protobuf.MethodOptions();\n if (object.deprecated != null)\n message.deprecated = Boolean(object.deprecated);\n if (object.uninterpretedOption) {\n if (!Array.isArray(object.uninterpretedOption))\n throw TypeError('.google.protobuf.MethodOptions.uninterpretedOption: array expected');\n message.uninterpretedOption = [];\n for (let i = 0; i < object.uninterpretedOption.length; ++i) {\n if (typeof object.uninterpretedOption[i] !== 'object')\n throw TypeError('.google.protobuf.MethodOptions.uninterpretedOption: object expected');\n message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);\n }\n }\n if (object['.google.api.http'] != null) {\n if (typeof object['.google.api.http'] !== 'object')\n throw TypeError('.google.protobuf.MethodOptions..google.api.http: object expected');\n message['.google.api.http'] = $root.google.api.HttpRule.fromObject(object['.google.api.http']);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.MethodOptions\n * @static\n * @param {google.protobuf.MethodOptions} message MethodOptions\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n MethodOptions.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.uninterpretedOption = [];\n if (options.defaults) {\n object.deprecated = false;\n object['.google.api.http'] = null;\n }\n if (message.deprecated != null && message.hasOwnProperty('deprecated'))\n object.deprecated = message.deprecated;\n if (message.uninterpretedOption && message.uninterpretedOption.length) {\n object.uninterpretedOption = [];\n for (let j = 0; j < message.uninterpretedOption.length; ++j)\n object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);\n }\n if (message['.google.api.http'] != null && message.hasOwnProperty('.google.api.http'))\n object['.google.api.http'] = $root.google.api.HttpRule.toObject(message['.google.api.http'], options);\n return object;\n };\n\n /**\n * Converts this MethodOptions to JSON.\n * @function toJSON\n * @memberof google.protobuf.MethodOptions\n * @instance\n * @returns {Object.} JSON object\n */\n MethodOptions.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return MethodOptions;\n })();\n\n protobuf.UninterpretedOption = (function () {\n\n /**\n * Properties of an UninterpretedOption.\n * @memberof google.protobuf\n * @interface IUninterpretedOption\n * @property {Array.|null} [name] UninterpretedOption name\n * @property {string|null} [identifierValue] UninterpretedOption identifierValue\n * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue\n * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue\n * @property {number|null} [doubleValue] UninterpretedOption doubleValue\n * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue\n * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue\n */\n\n /**\n * Constructs a new UninterpretedOption.\n * @memberof google.protobuf\n * @classdesc Represents an UninterpretedOption.\n * @implements IUninterpretedOption\n * @constructor\n * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set\n */\n function UninterpretedOption(properties) {\n this.name = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * UninterpretedOption name.\n * @member {Array.} name\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.name = $util.emptyArray;\n\n /**\n * UninterpretedOption identifierValue.\n * @member {string} identifierValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.identifierValue = '';\n\n /**\n * UninterpretedOption positiveIntValue.\n * @member {number|Long} positiveIntValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;\n\n /**\n * UninterpretedOption negativeIntValue.\n * @member {number|Long} negativeIntValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;\n\n /**\n * UninterpretedOption doubleValue.\n * @member {number} doubleValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.doubleValue = 0;\n\n /**\n * UninterpretedOption stringValue.\n * @member {Uint8Array} stringValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.stringValue = $util.newBuffer([]);\n\n /**\n * UninterpretedOption aggregateValue.\n * @member {string} aggregateValue\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n */\n UninterpretedOption.prototype.aggregateValue = '';\n\n /**\n * Creates a new UninterpretedOption instance using the specified properties.\n * @function create\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set\n * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance\n */\n UninterpretedOption.create = function create(properties) {\n return new UninterpretedOption(properties);\n };\n\n /**\n * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UninterpretedOption.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && message.name.length)\n for (let i = 0; i < message.name.length; ++i)\n $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();\n if (message.identifierValue != null && message.hasOwnProperty('identifierValue'))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue);\n if (message.positiveIntValue != null && message.hasOwnProperty('positiveIntValue'))\n writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue);\n if (message.negativeIntValue != null && message.hasOwnProperty('negativeIntValue'))\n writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue);\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue'))\n writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue);\n if (message.stringValue != null && message.hasOwnProperty('stringValue'))\n writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue);\n if (message.aggregateValue != null && message.hasOwnProperty('aggregateValue'))\n writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue);\n return writer;\n };\n\n /**\n * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UninterpretedOption message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.UninterpretedOption} UninterpretedOption\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UninterpretedOption.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n if (!(message.name && message.name.length))\n message.name = [];\n message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32()));\n break;\n case 3:\n message.identifierValue = reader.string();\n break;\n case 4:\n message.positiveIntValue = reader.uint64();\n break;\n case 5:\n message.negativeIntValue = reader.int64();\n break;\n case 6:\n message.doubleValue = reader.double();\n break;\n case 7:\n message.stringValue = reader.bytes();\n break;\n case 8:\n message.aggregateValue = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.UninterpretedOption} UninterpretedOption\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UninterpretedOption.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an UninterpretedOption message.\n * @function verify\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n UninterpretedOption.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.name != null && message.hasOwnProperty('name')) {\n if (!Array.isArray(message.name))\n return 'name: array expected';\n for (let i = 0; i < message.name.length; ++i) {\n let error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]);\n if (error)\n return 'name.' + error;\n }\n }\n if (message.identifierValue != null && message.hasOwnProperty('identifierValue'))\n if (!$util.isString(message.identifierValue))\n return 'identifierValue: string expected';\n if (message.positiveIntValue != null && message.hasOwnProperty('positiveIntValue'))\n if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high)))\n return 'positiveIntValue: integer|Long expected';\n if (message.negativeIntValue != null && message.hasOwnProperty('negativeIntValue'))\n if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high)))\n return 'negativeIntValue: integer|Long expected';\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue'))\n if (typeof message.doubleValue !== 'number')\n return 'doubleValue: number expected';\n if (message.stringValue != null && message.hasOwnProperty('stringValue'))\n if (!(message.stringValue && typeof message.stringValue.length === 'number' || $util.isString(message.stringValue)))\n return 'stringValue: buffer expected';\n if (message.aggregateValue != null && message.hasOwnProperty('aggregateValue'))\n if (!$util.isString(message.aggregateValue))\n return 'aggregateValue: string expected';\n return null;\n };\n\n /**\n * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.UninterpretedOption} UninterpretedOption\n */\n UninterpretedOption.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.UninterpretedOption)\n return object;\n let message = new $root.google.protobuf.UninterpretedOption();\n if (object.name) {\n if (!Array.isArray(object.name))\n throw TypeError('.google.protobuf.UninterpretedOption.name: array expected');\n message.name = [];\n for (let i = 0; i < object.name.length; ++i) {\n if (typeof object.name[i] !== 'object')\n throw TypeError('.google.protobuf.UninterpretedOption.name: object expected');\n message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]);\n }\n }\n if (object.identifierValue != null)\n message.identifierValue = String(object.identifierValue);\n if (object.positiveIntValue != null)\n if ($util.Long)\n (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true;\n else if (typeof object.positiveIntValue === 'string')\n message.positiveIntValue = parseInt(object.positiveIntValue, 10);\n else if (typeof object.positiveIntValue === 'number')\n message.positiveIntValue = object.positiveIntValue;\n else if (typeof object.positiveIntValue === 'object')\n message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true);\n if (object.negativeIntValue != null)\n if ($util.Long)\n (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false;\n else if (typeof object.negativeIntValue === 'string')\n message.negativeIntValue = parseInt(object.negativeIntValue, 10);\n else if (typeof object.negativeIntValue === 'number')\n message.negativeIntValue = object.negativeIntValue;\n else if (typeof object.negativeIntValue === 'object')\n message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber();\n if (object.doubleValue != null)\n message.doubleValue = Number(object.doubleValue);\n if (object.stringValue != null)\n if (typeof object.stringValue === 'string')\n $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0);\n else if (object.stringValue.length)\n message.stringValue = object.stringValue;\n if (object.aggregateValue != null)\n message.aggregateValue = String(object.aggregateValue);\n return message;\n };\n\n /**\n * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.UninterpretedOption\n * @static\n * @param {google.protobuf.UninterpretedOption} message UninterpretedOption\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n UninterpretedOption.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.name = [];\n if (options.defaults) {\n object.identifierValue = '';\n if ($util.Long) {\n let long = new $util.Long(0, 0, true);\n object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.positiveIntValue = options.longs === String ? '0' : 0;\n if ($util.Long) {\n let long = new $util.Long(0, 0, false);\n object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n } else\n object.negativeIntValue = options.longs === String ? '0' : 0;\n object.doubleValue = 0;\n if (options.bytes === String)\n object.stringValue = '';\n else {\n object.stringValue = [];\n if (options.bytes !== Array)\n object.stringValue = $util.newBuffer(object.stringValue);\n }\n object.aggregateValue = '';\n }\n if (message.name && message.name.length) {\n object.name = [];\n for (let j = 0; j < message.name.length; ++j)\n object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);\n }\n if (message.identifierValue != null && message.hasOwnProperty('identifierValue'))\n object.identifierValue = message.identifierValue;\n if (message.positiveIntValue != null && message.hasOwnProperty('positiveIntValue'))\n if (typeof message.positiveIntValue === 'number')\n object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue;\n else\n object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue;\n if (message.negativeIntValue != null && message.hasOwnProperty('negativeIntValue'))\n if (typeof message.negativeIntValue === 'number')\n object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue;\n else\n object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue;\n if (message.doubleValue != null && message.hasOwnProperty('doubleValue'))\n object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;\n if (message.stringValue != null && message.hasOwnProperty('stringValue'))\n object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue;\n if (message.aggregateValue != null && message.hasOwnProperty('aggregateValue'))\n object.aggregateValue = message.aggregateValue;\n return object;\n };\n\n /**\n * Converts this UninterpretedOption to JSON.\n * @function toJSON\n * @memberof google.protobuf.UninterpretedOption\n * @instance\n * @returns {Object.} JSON object\n */\n UninterpretedOption.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n UninterpretedOption.NamePart = (function () {\n\n /**\n * Properties of a NamePart.\n * @memberof google.protobuf.UninterpretedOption\n * @interface INamePart\n * @property {string} namePart NamePart namePart\n * @property {boolean} isExtension NamePart isExtension\n */\n\n /**\n * Constructs a new NamePart.\n * @memberof google.protobuf.UninterpretedOption\n * @classdesc Represents a NamePart.\n * @implements INamePart\n * @constructor\n * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set\n */\n function NamePart(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * NamePart namePart.\n * @member {string} namePart\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @instance\n */\n NamePart.prototype.namePart = '';\n\n /**\n * NamePart isExtension.\n * @member {boolean} isExtension\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @instance\n */\n NamePart.prototype.isExtension = false;\n\n /**\n * Creates a new NamePart instance using the specified properties.\n * @function create\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set\n * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance\n */\n NamePart.create = function create(properties) {\n return new NamePart(properties);\n };\n\n /**\n * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NamePart.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart);\n writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension);\n return writer;\n };\n\n /**\n * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NamePart.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NamePart message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NamePart.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.namePart = reader.string();\n break;\n case 2:\n message.isExtension = reader.bool();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n if (!message.hasOwnProperty('namePart'))\n throw $util.ProtocolError(\"missing required 'namePart'\", { instance: message });\n if (!message.hasOwnProperty('isExtension'))\n throw $util.ProtocolError(\"missing required 'isExtension'\", { instance: message });\n return message;\n };\n\n /**\n * Decodes a NamePart message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NamePart.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a NamePart message.\n * @function verify\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n NamePart.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (!$util.isString(message.namePart))\n return 'namePart: string expected';\n if (typeof message.isExtension !== 'boolean')\n return 'isExtension: boolean expected';\n return null;\n };\n\n /**\n * Creates a NamePart message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart\n */\n NamePart.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart)\n return object;\n let message = new $root.google.protobuf.UninterpretedOption.NamePart();\n if (object.namePart != null)\n message.namePart = String(object.namePart);\n if (object.isExtension != null)\n message.isExtension = Boolean(object.isExtension);\n return message;\n };\n\n /**\n * Creates a plain object from a NamePart message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @static\n * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n NamePart.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.namePart = '';\n object.isExtension = false;\n }\n if (message.namePart != null && message.hasOwnProperty('namePart'))\n object.namePart = message.namePart;\n if (message.isExtension != null && message.hasOwnProperty('isExtension'))\n object.isExtension = message.isExtension;\n return object;\n };\n\n /**\n * Converts this NamePart to JSON.\n * @function toJSON\n * @memberof google.protobuf.UninterpretedOption.NamePart\n * @instance\n * @returns {Object.} JSON object\n */\n NamePart.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return NamePart;\n })();\n\n return UninterpretedOption;\n })();\n\n protobuf.SourceCodeInfo = (function () {\n\n /**\n * Properties of a SourceCodeInfo.\n * @memberof google.protobuf\n * @interface ISourceCodeInfo\n * @property {Array.|null} [location] SourceCodeInfo location\n */\n\n /**\n * Constructs a new SourceCodeInfo.\n * @memberof google.protobuf\n * @classdesc Represents a SourceCodeInfo.\n * @implements ISourceCodeInfo\n * @constructor\n * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set\n */\n function SourceCodeInfo(properties) {\n this.location = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * SourceCodeInfo location.\n * @member {Array.} location\n * @memberof google.protobuf.SourceCodeInfo\n * @instance\n */\n SourceCodeInfo.prototype.location = $util.emptyArray;\n\n /**\n * Creates a new SourceCodeInfo instance using the specified properties.\n * @function create\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set\n * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance\n */\n SourceCodeInfo.create = function create(properties) {\n return new SourceCodeInfo(properties);\n };\n\n /**\n * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SourceCodeInfo.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.location != null && message.location.length)\n for (let i = 0; i < message.location.length; ++i)\n $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SourceCodeInfo message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SourceCodeInfo.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.location && message.location.length))\n message.location = [];\n message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a SourceCodeInfo message.\n * @function verify\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SourceCodeInfo.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.location != null && message.hasOwnProperty('location')) {\n if (!Array.isArray(message.location))\n return 'location: array expected';\n for (let i = 0; i < message.location.length; ++i) {\n let error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]);\n if (error)\n return 'location.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo\n */\n SourceCodeInfo.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.SourceCodeInfo)\n return object;\n let message = new $root.google.protobuf.SourceCodeInfo();\n if (object.location) {\n if (!Array.isArray(object.location))\n throw TypeError('.google.protobuf.SourceCodeInfo.location: array expected');\n message.location = [];\n for (let i = 0; i < object.location.length; ++i) {\n if (typeof object.location[i] !== 'object')\n throw TypeError('.google.protobuf.SourceCodeInfo.location: object expected');\n message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.SourceCodeInfo\n * @static\n * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n SourceCodeInfo.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.location = [];\n if (message.location && message.location.length) {\n object.location = [];\n for (let j = 0; j < message.location.length; ++j)\n object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options);\n }\n return object;\n };\n\n /**\n * Converts this SourceCodeInfo to JSON.\n * @function toJSON\n * @memberof google.protobuf.SourceCodeInfo\n * @instance\n * @returns {Object.} JSON object\n */\n SourceCodeInfo.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n SourceCodeInfo.Location = (function () {\n\n /**\n * Properties of a Location.\n * @memberof google.protobuf.SourceCodeInfo\n * @interface ILocation\n * @property {Array.|null} [path] Location path\n * @property {Array.|null} [span] Location span\n * @property {string|null} [leadingComments] Location leadingComments\n * @property {string|null} [trailingComments] Location trailingComments\n * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments\n */\n\n /**\n * Constructs a new Location.\n * @memberof google.protobuf.SourceCodeInfo\n * @classdesc Represents a Location.\n * @implements ILocation\n * @constructor\n * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set\n */\n function Location(properties) {\n this.path = [];\n this.span = [];\n this.leadingDetachedComments = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Location path.\n * @member {Array.} path\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n */\n Location.prototype.path = $util.emptyArray;\n\n /**\n * Location span.\n * @member {Array.} span\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n */\n Location.prototype.span = $util.emptyArray;\n\n /**\n * Location leadingComments.\n * @member {string} leadingComments\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n */\n Location.prototype.leadingComments = '';\n\n /**\n * Location trailingComments.\n * @member {string} trailingComments\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n */\n Location.prototype.trailingComments = '';\n\n /**\n * Location leadingDetachedComments.\n * @member {Array.} leadingDetachedComments\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n */\n Location.prototype.leadingDetachedComments = $util.emptyArray;\n\n /**\n * Creates a new Location instance using the specified properties.\n * @function create\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set\n * @returns {google.protobuf.SourceCodeInfo.Location} Location instance\n */\n Location.create = function create(properties) {\n return new Location(properties);\n };\n\n /**\n * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Location.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.path != null && message.path.length) {\n writer.uint32(/* id 1, wireType 2 =*/10).fork();\n for (let i = 0; i < message.path.length; ++i)\n writer.int32(message.path[i]);\n writer.ldelim();\n }\n if (message.span != null && message.span.length) {\n writer.uint32(/* id 2, wireType 2 =*/18).fork();\n for (let i = 0; i < message.span.length; ++i)\n writer.int32(message.span[i]);\n writer.ldelim();\n }\n if (message.leadingComments != null && message.hasOwnProperty('leadingComments'))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments);\n if (message.trailingComments != null && message.hasOwnProperty('trailingComments'))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments);\n if (message.leadingDetachedComments != null && message.leadingDetachedComments.length)\n for (let i = 0; i < message.leadingDetachedComments.length; ++i)\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]);\n return writer;\n };\n\n /**\n * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Location.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Location message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.SourceCodeInfo.Location} Location\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Location.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.path && message.path.length))\n message.path = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.path.push(reader.int32());\n } else\n message.path.push(reader.int32());\n break;\n case 2:\n if (!(message.span && message.span.length))\n message.span = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.span.push(reader.int32());\n } else\n message.span.push(reader.int32());\n break;\n case 3:\n message.leadingComments = reader.string();\n break;\n case 4:\n message.trailingComments = reader.string();\n break;\n case 6:\n if (!(message.leadingDetachedComments && message.leadingDetachedComments.length))\n message.leadingDetachedComments = [];\n message.leadingDetachedComments.push(reader.string());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Location message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.SourceCodeInfo.Location} Location\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Location.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Location message.\n * @function verify\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Location.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.path != null && message.hasOwnProperty('path')) {\n if (!Array.isArray(message.path))\n return 'path: array expected';\n for (let i = 0; i < message.path.length; ++i)\n if (!$util.isInteger(message.path[i]))\n return 'path: integer[] expected';\n }\n if (message.span != null && message.hasOwnProperty('span')) {\n if (!Array.isArray(message.span))\n return 'span: array expected';\n for (let i = 0; i < message.span.length; ++i)\n if (!$util.isInteger(message.span[i]))\n return 'span: integer[] expected';\n }\n if (message.leadingComments != null && message.hasOwnProperty('leadingComments'))\n if (!$util.isString(message.leadingComments))\n return 'leadingComments: string expected';\n if (message.trailingComments != null && message.hasOwnProperty('trailingComments'))\n if (!$util.isString(message.trailingComments))\n return 'trailingComments: string expected';\n if (message.leadingDetachedComments != null && message.hasOwnProperty('leadingDetachedComments')) {\n if (!Array.isArray(message.leadingDetachedComments))\n return 'leadingDetachedComments: array expected';\n for (let i = 0; i < message.leadingDetachedComments.length; ++i)\n if (!$util.isString(message.leadingDetachedComments[i]))\n return 'leadingDetachedComments: string[] expected';\n }\n return null;\n };\n\n /**\n * Creates a Location message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.SourceCodeInfo.Location} Location\n */\n Location.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.SourceCodeInfo.Location)\n return object;\n let message = new $root.google.protobuf.SourceCodeInfo.Location();\n if (object.path) {\n if (!Array.isArray(object.path))\n throw TypeError('.google.protobuf.SourceCodeInfo.Location.path: array expected');\n message.path = [];\n for (let i = 0; i < object.path.length; ++i)\n message.path[i] = object.path[i] | 0;\n }\n if (object.span) {\n if (!Array.isArray(object.span))\n throw TypeError('.google.protobuf.SourceCodeInfo.Location.span: array expected');\n message.span = [];\n for (let i = 0; i < object.span.length; ++i)\n message.span[i] = object.span[i] | 0;\n }\n if (object.leadingComments != null)\n message.leadingComments = String(object.leadingComments);\n if (object.trailingComments != null)\n message.trailingComments = String(object.trailingComments);\n if (object.leadingDetachedComments) {\n if (!Array.isArray(object.leadingDetachedComments))\n throw TypeError('.google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected');\n message.leadingDetachedComments = [];\n for (let i = 0; i < object.leadingDetachedComments.length; ++i)\n message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]);\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Location message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @static\n * @param {google.protobuf.SourceCodeInfo.Location} message Location\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Location.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults) {\n object.path = [];\n object.span = [];\n object.leadingDetachedComments = [];\n }\n if (options.defaults) {\n object.leadingComments = '';\n object.trailingComments = '';\n }\n if (message.path && message.path.length) {\n object.path = [];\n for (let j = 0; j < message.path.length; ++j)\n object.path[j] = message.path[j];\n }\n if (message.span && message.span.length) {\n object.span = [];\n for (let j = 0; j < message.span.length; ++j)\n object.span[j] = message.span[j];\n }\n if (message.leadingComments != null && message.hasOwnProperty('leadingComments'))\n object.leadingComments = message.leadingComments;\n if (message.trailingComments != null && message.hasOwnProperty('trailingComments'))\n object.trailingComments = message.trailingComments;\n if (message.leadingDetachedComments && message.leadingDetachedComments.length) {\n object.leadingDetachedComments = [];\n for (let j = 0; j < message.leadingDetachedComments.length; ++j)\n object.leadingDetachedComments[j] = message.leadingDetachedComments[j];\n }\n return object;\n };\n\n /**\n * Converts this Location to JSON.\n * @function toJSON\n * @memberof google.protobuf.SourceCodeInfo.Location\n * @instance\n * @returns {Object.} JSON object\n */\n Location.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Location;\n })();\n\n return SourceCodeInfo;\n })();\n\n protobuf.GeneratedCodeInfo = (function () {\n\n /**\n * Properties of a GeneratedCodeInfo.\n * @memberof google.protobuf\n * @interface IGeneratedCodeInfo\n * @property {Array.|null} [annotation] GeneratedCodeInfo annotation\n */\n\n /**\n * Constructs a new GeneratedCodeInfo.\n * @memberof google.protobuf\n * @classdesc Represents a GeneratedCodeInfo.\n * @implements IGeneratedCodeInfo\n * @constructor\n * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set\n */\n function GeneratedCodeInfo(properties) {\n this.annotation = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * GeneratedCodeInfo annotation.\n * @member {Array.} annotation\n * @memberof google.protobuf.GeneratedCodeInfo\n * @instance\n */\n GeneratedCodeInfo.prototype.annotation = $util.emptyArray;\n\n /**\n * Creates a new GeneratedCodeInfo instance using the specified properties.\n * @function create\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set\n * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance\n */\n GeneratedCodeInfo.create = function create(properties) {\n return new GeneratedCodeInfo(properties);\n };\n\n /**\n * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GeneratedCodeInfo.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.annotation != null && message.annotation.length)\n for (let i = 0; i < message.annotation.length; ++i)\n $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GeneratedCodeInfo message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GeneratedCodeInfo.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.annotation && message.annotation.length))\n message.annotation = [];\n message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a GeneratedCodeInfo message.\n * @function verify\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n GeneratedCodeInfo.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.annotation != null && message.hasOwnProperty('annotation')) {\n if (!Array.isArray(message.annotation))\n return 'annotation: array expected';\n for (let i = 0; i < message.annotation.length; ++i) {\n let error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]);\n if (error)\n return 'annotation.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo\n */\n GeneratedCodeInfo.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.GeneratedCodeInfo)\n return object;\n let message = new $root.google.protobuf.GeneratedCodeInfo();\n if (object.annotation) {\n if (!Array.isArray(object.annotation))\n throw TypeError('.google.protobuf.GeneratedCodeInfo.annotation: array expected');\n message.annotation = [];\n for (let i = 0; i < object.annotation.length; ++i) {\n if (typeof object.annotation[i] !== 'object')\n throw TypeError('.google.protobuf.GeneratedCodeInfo.annotation: object expected');\n message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.GeneratedCodeInfo\n * @static\n * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n GeneratedCodeInfo.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.annotation = [];\n if (message.annotation && message.annotation.length) {\n object.annotation = [];\n for (let j = 0; j < message.annotation.length; ++j)\n object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options);\n }\n return object;\n };\n\n /**\n * Converts this GeneratedCodeInfo to JSON.\n * @function toJSON\n * @memberof google.protobuf.GeneratedCodeInfo\n * @instance\n * @returns {Object.} JSON object\n */\n GeneratedCodeInfo.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n GeneratedCodeInfo.Annotation = (function () {\n\n /**\n * Properties of an Annotation.\n * @memberof google.protobuf.GeneratedCodeInfo\n * @interface IAnnotation\n * @property {Array.|null} [path] Annotation path\n * @property {string|null} [sourceFile] Annotation sourceFile\n * @property {number|null} [begin] Annotation begin\n * @property {number|null} [end] Annotation end\n */\n\n /**\n * Constructs a new Annotation.\n * @memberof google.protobuf.GeneratedCodeInfo\n * @classdesc Represents an Annotation.\n * @implements IAnnotation\n * @constructor\n * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set\n */\n function Annotation(properties) {\n this.path = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Annotation path.\n * @member {Array.} path\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @instance\n */\n Annotation.prototype.path = $util.emptyArray;\n\n /**\n * Annotation sourceFile.\n * @member {string} sourceFile\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @instance\n */\n Annotation.prototype.sourceFile = '';\n\n /**\n * Annotation begin.\n * @member {number} begin\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @instance\n */\n Annotation.prototype.begin = 0;\n\n /**\n * Annotation end.\n * @member {number} end\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @instance\n */\n Annotation.prototype.end = 0;\n\n /**\n * Creates a new Annotation instance using the specified properties.\n * @function create\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set\n * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance\n */\n Annotation.create = function create(properties) {\n return new Annotation(properties);\n };\n\n /**\n * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.\n * @function encode\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Annotation.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.path != null && message.path.length) {\n writer.uint32(/* id 1, wireType 2 =*/10).fork();\n for (let i = 0; i < message.path.length; ++i)\n writer.int32(message.path[i]);\n writer.ldelim();\n }\n if (message.sourceFile != null && message.hasOwnProperty('sourceFile'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile);\n if (message.begin != null && message.hasOwnProperty('begin'))\n writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin);\n if (message.end != null && message.hasOwnProperty('end'))\n writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end);\n return writer;\n };\n\n /**\n * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Annotation.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an Annotation message from the specified reader or buffer.\n * @function decode\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Annotation.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.path && message.path.length))\n message.path = [];\n if ((tag & 7) === 2) {\n let end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.path.push(reader.int32());\n } else\n message.path.push(reader.int32());\n break;\n case 2:\n message.sourceFile = reader.string();\n break;\n case 3:\n message.begin = reader.int32();\n break;\n case 4:\n message.end = reader.int32();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes an Annotation message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Annotation.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies an Annotation message.\n * @function verify\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Annotation.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.path != null && message.hasOwnProperty('path')) {\n if (!Array.isArray(message.path))\n return 'path: array expected';\n for (let i = 0; i < message.path.length; ++i)\n if (!$util.isInteger(message.path[i]))\n return 'path: integer[] expected';\n }\n if (message.sourceFile != null && message.hasOwnProperty('sourceFile'))\n if (!$util.isString(message.sourceFile))\n return 'sourceFile: string expected';\n if (message.begin != null && message.hasOwnProperty('begin'))\n if (!$util.isInteger(message.begin))\n return 'begin: integer expected';\n if (message.end != null && message.hasOwnProperty('end'))\n if (!$util.isInteger(message.end))\n return 'end: integer expected';\n return null;\n };\n\n /**\n * Creates an Annotation message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {Object.} object Plain object\n * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation\n */\n Annotation.fromObject = function fromObject(object) {\n if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation)\n return object;\n let message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();\n if (object.path) {\n if (!Array.isArray(object.path))\n throw TypeError('.google.protobuf.GeneratedCodeInfo.Annotation.path: array expected');\n message.path = [];\n for (let i = 0; i < object.path.length; ++i)\n message.path[i] = object.path[i] | 0;\n }\n if (object.sourceFile != null)\n message.sourceFile = String(object.sourceFile);\n if (object.begin != null)\n message.begin = object.begin | 0;\n if (object.end != null)\n message.end = object.end | 0;\n return message;\n };\n\n /**\n * Creates a plain object from an Annotation message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @static\n * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Annotation.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.path = [];\n if (options.defaults) {\n object.sourceFile = '';\n object.begin = 0;\n object.end = 0;\n }\n if (message.path && message.path.length) {\n object.path = [];\n for (let j = 0; j < message.path.length; ++j)\n object.path[j] = message.path[j];\n }\n if (message.sourceFile != null && message.hasOwnProperty('sourceFile'))\n object.sourceFile = message.sourceFile;\n if (message.begin != null && message.hasOwnProperty('begin'))\n object.begin = message.begin;\n if (message.end != null && message.hasOwnProperty('end'))\n object.end = message.end;\n return object;\n };\n\n /**\n * Converts this Annotation to JSON.\n * @function toJSON\n * @memberof google.protobuf.GeneratedCodeInfo.Annotation\n * @instance\n * @returns {Object.} JSON object\n */\n Annotation.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Annotation;\n })();\n\n return GeneratedCodeInfo;\n })();\n\n return protobuf;\n })();\n\n google.api = (function () {\n\n /**\n * Namespace api.\n * @memberof google\n * @namespace\n */\n const api = {};\n\n api.Http = (function () {\n\n /**\n * Properties of a Http.\n * @memberof google.api\n * @interface IHttp\n * @property {Array.|null} [rules] Http rules\n */\n\n /**\n * Constructs a new Http.\n * @memberof google.api\n * @classdesc Represents a Http.\n * @implements IHttp\n * @constructor\n * @param {google.api.IHttp=} [properties] Properties to set\n */\n function Http(properties) {\n this.rules = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * Http rules.\n * @member {Array.} rules\n * @memberof google.api.Http\n * @instance\n */\n Http.prototype.rules = $util.emptyArray;\n\n /**\n * Creates a new Http instance using the specified properties.\n * @function create\n * @memberof google.api.Http\n * @static\n * @param {google.api.IHttp=} [properties] Properties to set\n * @returns {google.api.Http} Http instance\n */\n Http.create = function create(properties) {\n return new Http(properties);\n };\n\n /**\n * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.\n * @function encode\n * @memberof google.api.Http\n * @static\n * @param {google.api.IHttp} message Http message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Http.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.rules != null && message.rules.length)\n for (let i = 0; i < message.rules.length; ++i)\n $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.api.Http\n * @static\n * @param {google.api.IHttp} message Http message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Http.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a Http message from the specified reader or buffer.\n * @function decode\n * @memberof google.api.Http\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.api.Http} Http\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Http.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (!(message.rules && message.rules.length))\n message.rules = [];\n message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a Http message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.api.Http\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.api.Http} Http\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Http.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a Http message.\n * @function verify\n * @memberof google.api.Http\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Http.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.rules != null && message.hasOwnProperty('rules')) {\n if (!Array.isArray(message.rules))\n return 'rules: array expected';\n for (let i = 0; i < message.rules.length; ++i) {\n let error = $root.google.api.HttpRule.verify(message.rules[i]);\n if (error)\n return 'rules.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a Http message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.api.Http\n * @static\n * @param {Object.} object Plain object\n * @returns {google.api.Http} Http\n */\n Http.fromObject = function fromObject(object) {\n if (object instanceof $root.google.api.Http)\n return object;\n let message = new $root.google.api.Http();\n if (object.rules) {\n if (!Array.isArray(object.rules))\n throw TypeError('.google.api.Http.rules: array expected');\n message.rules = [];\n for (let i = 0; i < object.rules.length; ++i) {\n if (typeof object.rules[i] !== 'object')\n throw TypeError('.google.api.Http.rules: object expected');\n message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a Http message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.api.Http\n * @static\n * @param {google.api.Http} message Http\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Http.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.rules = [];\n if (message.rules && message.rules.length) {\n object.rules = [];\n for (let j = 0; j < message.rules.length; ++j)\n object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);\n }\n return object;\n };\n\n /**\n * Converts this Http to JSON.\n * @function toJSON\n * @memberof google.api.Http\n * @instance\n * @returns {Object.} JSON object\n */\n Http.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return Http;\n })();\n\n api.HttpRule = (function () {\n\n /**\n * Properties of a HttpRule.\n * @memberof google.api\n * @interface IHttpRule\n * @property {string|null} [get] HttpRule get\n * @property {string|null} [put] HttpRule put\n * @property {string|null} [post] HttpRule post\n * @property {string|null} [\"delete\"] HttpRule delete\n * @property {string|null} [patch] HttpRule patch\n * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom\n * @property {string|null} [selector] HttpRule selector\n * @property {string|null} [body] HttpRule body\n * @property {Array.|null} [additionalBindings] HttpRule additionalBindings\n */\n\n /**\n * Constructs a new HttpRule.\n * @memberof google.api\n * @classdesc Represents a HttpRule.\n * @implements IHttpRule\n * @constructor\n * @param {google.api.IHttpRule=} [properties] Properties to set\n */\n function HttpRule(properties) {\n this.additionalBindings = [];\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * HttpRule get.\n * @member {string} get\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.get = '';\n\n /**\n * HttpRule put.\n * @member {string} put\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.put = '';\n\n /**\n * HttpRule post.\n * @member {string} post\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.post = '';\n\n /**\n * HttpRule delete.\n * @member {string} delete\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype['delete'] = '';\n\n /**\n * HttpRule patch.\n * @member {string} patch\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.patch = '';\n\n /**\n * HttpRule custom.\n * @member {google.api.ICustomHttpPattern|null|undefined} custom\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.custom = null;\n\n /**\n * HttpRule selector.\n * @member {string} selector\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.selector = '';\n\n /**\n * HttpRule body.\n * @member {string} body\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.body = '';\n\n /**\n * HttpRule additionalBindings.\n * @member {Array.} additionalBindings\n * @memberof google.api.HttpRule\n * @instance\n */\n HttpRule.prototype.additionalBindings = $util.emptyArray;\n\n // OneOf field names bound to virtual getters and setters\n let $oneOfFields;\n\n /**\n * HttpRule pattern.\n * @member {\"get\"|\"put\"|\"post\"|\"delete\"|\"patch\"|\"custom\"|undefined} pattern\n * @memberof google.api.HttpRule\n * @instance\n */\n Object.defineProperty(HttpRule.prototype, 'pattern', {\n get: $util.oneOfGetter($oneOfFields = ['get', 'put', 'post', 'delete', 'patch', 'custom']),\n set: $util.oneOfSetter($oneOfFields)\n });\n\n /**\n * Creates a new HttpRule instance using the specified properties.\n * @function create\n * @memberof google.api.HttpRule\n * @static\n * @param {google.api.IHttpRule=} [properties] Properties to set\n * @returns {google.api.HttpRule} HttpRule instance\n */\n HttpRule.create = function create(properties) {\n return new HttpRule(properties);\n };\n\n /**\n * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.\n * @function encode\n * @memberof google.api.HttpRule\n * @static\n * @param {google.api.IHttpRule} message HttpRule message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HttpRule.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.selector != null && message.hasOwnProperty('selector'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);\n if (message.get != null && message.hasOwnProperty('get'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);\n if (message.put != null && message.hasOwnProperty('put'))\n writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);\n if (message.post != null && message.hasOwnProperty('post'))\n writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);\n if (message['delete'] != null && message.hasOwnProperty('delete'))\n writer.uint32(/* id 5, wireType 2 =*/42).string(message['delete']);\n if (message.patch != null && message.hasOwnProperty('patch'))\n writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);\n if (message.body != null && message.hasOwnProperty('body'))\n writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);\n if (message.custom != null && message.hasOwnProperty('custom'))\n $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();\n if (message.additionalBindings != null && message.additionalBindings.length)\n for (let i = 0; i < message.additionalBindings.length; ++i)\n $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();\n return writer;\n };\n\n /**\n * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.api.HttpRule\n * @static\n * @param {google.api.IHttpRule} message HttpRule message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HttpRule.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HttpRule message from the specified reader or buffer.\n * @function decode\n * @memberof google.api.HttpRule\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.api.HttpRule} HttpRule\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HttpRule.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n message.get = reader.string();\n break;\n case 3:\n message.put = reader.string();\n break;\n case 4:\n message.post = reader.string();\n break;\n case 5:\n message['delete'] = reader.string();\n break;\n case 6:\n message.patch = reader.string();\n break;\n case 8:\n message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());\n break;\n case 1:\n message.selector = reader.string();\n break;\n case 7:\n message.body = reader.string();\n break;\n case 11:\n if (!(message.additionalBindings && message.additionalBindings.length))\n message.additionalBindings = [];\n message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a HttpRule message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.api.HttpRule\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.api.HttpRule} HttpRule\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HttpRule.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a HttpRule message.\n * @function verify\n * @memberof google.api.HttpRule\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HttpRule.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n let properties = {};\n if (message.get != null && message.hasOwnProperty('get')) {\n properties.pattern = 1;\n if (!$util.isString(message.get))\n return 'get: string expected';\n }\n if (message.put != null && message.hasOwnProperty('put')) {\n if (properties.pattern === 1)\n return 'pattern: multiple values';\n properties.pattern = 1;\n if (!$util.isString(message.put))\n return 'put: string expected';\n }\n if (message.post != null && message.hasOwnProperty('post')) {\n if (properties.pattern === 1)\n return 'pattern: multiple values';\n properties.pattern = 1;\n if (!$util.isString(message.post))\n return 'post: string expected';\n }\n if (message['delete'] != null && message.hasOwnProperty('delete')) {\n if (properties.pattern === 1)\n return 'pattern: multiple values';\n properties.pattern = 1;\n if (!$util.isString(message['delete']))\n return 'delete: string expected';\n }\n if (message.patch != null && message.hasOwnProperty('patch')) {\n if (properties.pattern === 1)\n return 'pattern: multiple values';\n properties.pattern = 1;\n if (!$util.isString(message.patch))\n return 'patch: string expected';\n }\n if (message.custom != null && message.hasOwnProperty('custom')) {\n if (properties.pattern === 1)\n return 'pattern: multiple values';\n properties.pattern = 1;\n {\n let error = $root.google.api.CustomHttpPattern.verify(message.custom);\n if (error)\n return 'custom.' + error;\n }\n }\n if (message.selector != null && message.hasOwnProperty('selector'))\n if (!$util.isString(message.selector))\n return 'selector: string expected';\n if (message.body != null && message.hasOwnProperty('body'))\n if (!$util.isString(message.body))\n return 'body: string expected';\n if (message.additionalBindings != null && message.hasOwnProperty('additionalBindings')) {\n if (!Array.isArray(message.additionalBindings))\n return 'additionalBindings: array expected';\n for (let i = 0; i < message.additionalBindings.length; ++i) {\n let error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);\n if (error)\n return 'additionalBindings.' + error;\n }\n }\n return null;\n };\n\n /**\n * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.api.HttpRule\n * @static\n * @param {Object.} object Plain object\n * @returns {google.api.HttpRule} HttpRule\n */\n HttpRule.fromObject = function fromObject(object) {\n if (object instanceof $root.google.api.HttpRule)\n return object;\n let message = new $root.google.api.HttpRule();\n if (object.get != null)\n message.get = String(object.get);\n if (object.put != null)\n message.put = String(object.put);\n if (object.post != null)\n message.post = String(object.post);\n if (object['delete'] != null)\n message['delete'] = String(object['delete']);\n if (object.patch != null)\n message.patch = String(object.patch);\n if (object.custom != null) {\n if (typeof object.custom !== 'object')\n throw TypeError('.google.api.HttpRule.custom: object expected');\n message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);\n }\n if (object.selector != null)\n message.selector = String(object.selector);\n if (object.body != null)\n message.body = String(object.body);\n if (object.additionalBindings) {\n if (!Array.isArray(object.additionalBindings))\n throw TypeError('.google.api.HttpRule.additionalBindings: array expected');\n message.additionalBindings = [];\n for (let i = 0; i < object.additionalBindings.length; ++i) {\n if (typeof object.additionalBindings[i] !== 'object')\n throw TypeError('.google.api.HttpRule.additionalBindings: object expected');\n message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);\n }\n }\n return message;\n };\n\n /**\n * Creates a plain object from a HttpRule message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.api.HttpRule\n * @static\n * @param {google.api.HttpRule} message HttpRule\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n HttpRule.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.arrays || options.defaults)\n object.additionalBindings = [];\n if (options.defaults) {\n object.selector = '';\n object.body = '';\n }\n if (message.selector != null && message.hasOwnProperty('selector'))\n object.selector = message.selector;\n if (message.get != null && message.hasOwnProperty('get')) {\n object.get = message.get;\n if (options.oneofs)\n object.pattern = 'get';\n }\n if (message.put != null && message.hasOwnProperty('put')) {\n object.put = message.put;\n if (options.oneofs)\n object.pattern = 'put';\n }\n if (message.post != null && message.hasOwnProperty('post')) {\n object.post = message.post;\n if (options.oneofs)\n object.pattern = 'post';\n }\n if (message['delete'] != null && message.hasOwnProperty('delete')) {\n object['delete'] = message['delete'];\n if (options.oneofs)\n object.pattern = 'delete';\n }\n if (message.patch != null && message.hasOwnProperty('patch')) {\n object.patch = message.patch;\n if (options.oneofs)\n object.pattern = 'patch';\n }\n if (message.body != null && message.hasOwnProperty('body'))\n object.body = message.body;\n if (message.custom != null && message.hasOwnProperty('custom')) {\n object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);\n if (options.oneofs)\n object.pattern = 'custom';\n }\n if (message.additionalBindings && message.additionalBindings.length) {\n object.additionalBindings = [];\n for (let j = 0; j < message.additionalBindings.length; ++j)\n object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);\n }\n return object;\n };\n\n /**\n * Converts this HttpRule to JSON.\n * @function toJSON\n * @memberof google.api.HttpRule\n * @instance\n * @returns {Object.} JSON object\n */\n HttpRule.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return HttpRule;\n })();\n\n api.CustomHttpPattern = (function () {\n\n /**\n * Properties of a CustomHttpPattern.\n * @memberof google.api\n * @interface ICustomHttpPattern\n * @property {string|null} [kind] CustomHttpPattern kind\n * @property {string|null} [path] CustomHttpPattern path\n */\n\n /**\n * Constructs a new CustomHttpPattern.\n * @memberof google.api\n * @classdesc Represents a CustomHttpPattern.\n * @implements ICustomHttpPattern\n * @constructor\n * @param {google.api.ICustomHttpPattern=} [properties] Properties to set\n */\n function CustomHttpPattern(properties) {\n if (properties)\n for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n\n /**\n * CustomHttpPattern kind.\n * @member {string} kind\n * @memberof google.api.CustomHttpPattern\n * @instance\n */\n CustomHttpPattern.prototype.kind = '';\n\n /**\n * CustomHttpPattern path.\n * @member {string} path\n * @memberof google.api.CustomHttpPattern\n * @instance\n */\n CustomHttpPattern.prototype.path = '';\n\n /**\n * Creates a new CustomHttpPattern instance using the specified properties.\n * @function create\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {google.api.ICustomHttpPattern=} [properties] Properties to set\n * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance\n */\n CustomHttpPattern.create = function create(properties) {\n return new CustomHttpPattern(properties);\n };\n\n /**\n * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.\n * @function encode\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CustomHttpPattern.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.kind != null && message.hasOwnProperty('kind'))\n writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);\n if (message.path != null && message.hasOwnProperty('path'))\n writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);\n return writer;\n };\n\n /**\n * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.\n * @function encodeDelimited\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a CustomHttpPattern message from the specified reader or buffer.\n * @function decode\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {google.api.CustomHttpPattern} CustomHttpPattern\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CustomHttpPattern.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();\n while (reader.pos < end) {\n let tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.kind = reader.string();\n break;\n case 2:\n message.path = reader.string();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n\n /**\n * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {google.api.CustomHttpPattern} CustomHttpPattern\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n /**\n * Verifies a CustomHttpPattern message.\n * @function verify\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n CustomHttpPattern.verify = function verify(message) {\n if (typeof message !== 'object' || message === null)\n return 'object expected';\n if (message.kind != null && message.hasOwnProperty('kind'))\n if (!$util.isString(message.kind))\n return 'kind: string expected';\n if (message.path != null && message.hasOwnProperty('path'))\n if (!$util.isString(message.path))\n return 'path: string expected';\n return null;\n };\n\n /**\n * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {Object.} object Plain object\n * @returns {google.api.CustomHttpPattern} CustomHttpPattern\n */\n CustomHttpPattern.fromObject = function fromObject(object) {\n if (object instanceof $root.google.api.CustomHttpPattern)\n return object;\n let message = new $root.google.api.CustomHttpPattern();\n if (object.kind != null)\n message.kind = String(object.kind);\n if (object.path != null)\n message.path = String(object.path);\n return message;\n };\n\n /**\n * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.\n * @function toObject\n * @memberof google.api.CustomHttpPattern\n * @static\n * @param {google.api.CustomHttpPattern} message CustomHttpPattern\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n CustomHttpPattern.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n let object = {};\n if (options.defaults) {\n object.kind = '';\n object.path = '';\n }\n if (message.kind != null && message.hasOwnProperty('kind'))\n object.kind = message.kind;\n if (message.path != null && message.hasOwnProperty('path'))\n object.path = message.path;\n return object;\n };\n\n /**\n * Converts this CustomHttpPattern to JSON.\n * @function toJSON\n * @memberof google.api.CustomHttpPattern\n * @instance\n * @returns {Object.} JSON object\n */\n CustomHttpPattern.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n\n return CustomHttpPattern;\n })();\n\n return api;\n })();\n\n return google;\n})();\n\nexport { $root as default };\n","import _each from '../_each';\n\nclass PackageGlobals {\n constructor() {\n this.options = {};\n }\n\n setOptions(opts) {\n _each(opts, (val, key) => {\n this.options[key] = val;\n });\n }\n}\n\nmodule.exports = new PackageGlobals();\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nconst constants = require('../constants');\nconst coerce = require('./coerce');\n\n// Facade on the thrift log data structure to make constructing log records more\n// convenient.\nclass LogBuilder {\n\n constructor(runtime) {\n this._runtime = runtime;\n this._record = new crouton_thrift.LogRecord({\n timestamp_micros : runtime._platform.nowMicros(),\n runtime_guid : null,\n span_guid : null,\n stable_name : null,\n message : null,\n level : null,\n thread_id : null,\n filename : null,\n line_number : null,\n stack_frames : null,\n payload_json : null,\n error_flag : null,\n });\n }\n\n record() {\n return this._record;\n }\n\n end() {\n this._runtime._addLogRecord(this._record);\n }\n\n timestamp(micros) {\n this._record.timestamp_micros = coerce.toNumber(micros);\n return this;\n }\n\n message(msg) {\n this._record.message = coerce.toString(msg);\n return this;\n }\n\n level(num) {\n this._record.level = constants.LOG_LEVEL_TO_STRING[num] || null;\n if (num >= constants.LOG_ERROR) {\n this.error(true);\n }\n return this;\n }\n\n span(guid) {\n if (guid !== undefined) {\n this._record.span_guid = coerce.toString(guid);\n }\n return this;\n }\n\n name(stableName) {\n this._record.stable_name = coerce.toString(stableName);\n return this;\n }\n\n error(flag) {\n this._record.error_flag = coerce.toBoolean(flag);\n return this;\n }\n\n payload(data) {\n if (data !== undefined) {\n this._record.payload_json = this._encodePayload(data);\n }\n return this;\n }\n\n _encodePayload(data) {\n let payloadJSON = null;\n try {\n payloadJSON = JSON.stringify(data);\n } catch (_ignored) {\n // TODO: this should log an internal warning that a payload could\n // not be encoded as JSON.\n return undefined;\n }\n return payloadJSON;\n }\n}\n\nmodule.exports = LogBuilder;\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport _each from '../_each';\nimport * as coerce from './coerce'; // eslint-disable-line camelcase\nimport { lightstep, google } from './generated_proto';\nlet proto = lightstep.collector;\nlet googleProtobufTimestampPB = google.proto;\n\nexport default class LogRecordImp {\n constructor(logFieldKeyHardLimit, logFieldValueHardLimit, timestampMicros, fields) {\n this._logFieldKeyHardLimit = logFieldKeyHardLimit;\n this._logFieldValueHardLimit = logFieldValueHardLimit;\n this._timestampMicros = timestampMicros;\n this._fields = fields;\n this._keysOverLimit = 0;\n this._valuesOverLimit = 0;\n }\n\n _clearOverLimits() {\n this._keysOverLimit = 0;\n this._valuesOverLimit = 0;\n }\n\n getNumKeysOverLimit() {\n return this._keysOverLimit;\n }\n\n getNumValuesOverLimit() {\n return this._valuesOverLimit;\n }\n\n toThrift() {\n this._clearOverLimits();\n let thriftFields = [];\n _each(this._fields, (value, key) => {\n if (!key || !value) {\n return;\n }\n let keyStr = this.getFieldKey(key);\n let valStr = this.getFieldValue(value);\n thriftFields.push(new crouton_thrift.KeyValue({\n Key : keyStr,\n Value : valStr,\n }));\n });\n\n return new crouton_thrift.LogRecord({\n timestamp_micros : this._timestampMicros,\n fields : thriftFields,\n });\n }\n\n getFieldKey(key) {\n let keyStr = coerce.toString(key);\n if (keyStr.length > this._logFieldKeyHardLimit) {\n this._keysOverLimit += 1;\n keyStr = `${keyStr.substr(0, this._logFieldKeyHardLimit)}...`;\n }\n return keyStr;\n }\n\n getFieldValue(value) {\n let valStr = null;\n if (value instanceof Object) {\n try {\n valStr = JSON.stringify(value, null, ' ');\n } catch (e) {\n valStr = `Could not encode value. Exception: ${e}`;\n }\n } else {\n valStr = coerce.toString(value);\n }\n if (valStr.length > this._logFieldValueHardLimit) {\n this._valuesOverLimit += 1;\n valStr = `${valStr.substr(0, this._logFieldValueHardLimit)}...`;\n }\n return valStr;\n }\n\n toProto() {\n this._clearOverLimits();\n let log = new proto.Log();\n let ts = new googleProtobufTimestampPB.Timestamp();\n let millis = Math.floor(this._timestampMicros / 1000);\n let secs = Math.floor(millis / 1000);\n let nanos = (millis % 1000) * 1000000;\n ts.seconds = secs;\n ts.nanos = nanos;\n log.Timestamp = ts;\n let keyValues = [];\n _each(this._fields, (value, key) => {\n if (!key || !value) {\n return;\n }\n let keyStr = this.getFieldKey(key);\n let valStr = this.getFieldValue(value);\n\n let keyValue = new proto.KeyValue();\n keyValue.key = keyStr;\n keyValue.stringValue = valStr;\n keyValues.push(keyValue);\n });\n\n log.fields = keyValues;\n\n return log;\n }\n}\n","module.exports = require('./generated/thrift_all.js').crouton_thrift;\n","//\n// GENERATED FILE - DO NOT EDIT DIRECTLY\n//\n// See scripts/build_browser_thrift_lib.js\n//\n//\n(function() {\nvar Thrift = {};\nvar crouton_thrift = {};\n//\n// Autogenerated by Thrift Compiler (0.9.2)\n//\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n\n\nif (typeof crouton_thrift === 'undefined') {\n crouton_thrift = {};\n}\ncrouton_thrift.KeyValue = function(args) {\n this.Key = null;\n this.Value = null;\n if (args) {\n if (args.Key !== undefined) {\n this.Key = args.Key;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Key is unset!');\n }\n if (args.Value !== undefined) {\n this.Value = args.Value;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');\n }\n }\n};\ncrouton_thrift.KeyValue.prototype = {};\ncrouton_thrift.KeyValue.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.Key = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.Value = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.KeyValue.prototype.write = false && function(output) {\n output.writeStructBegin('KeyValue');\n if (this.Key !== null && this.Key !== undefined) {\n output.writeFieldBegin('Key', Thrift.Type.STRING, 1);\n output.writeString(this.Key);\n output.writeFieldEnd();\n }\n if (this.Value !== null && this.Value !== undefined) {\n output.writeFieldBegin('Value', Thrift.Type.STRING, 2);\n output.writeString(this.Value);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.NamedCounter = function(args) {\n this.Name = null;\n this.Value = null;\n if (args) {\n if (args.Name !== undefined) {\n this.Name = args.Name;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Name is unset!');\n }\n if (args.Value !== undefined) {\n this.Value = args.Value;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');\n }\n }\n};\ncrouton_thrift.NamedCounter.prototype = {};\ncrouton_thrift.NamedCounter.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.Name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.Value = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.NamedCounter.prototype.write = false && function(output) {\n output.writeStructBegin('NamedCounter');\n if (this.Name !== null && this.Name !== undefined) {\n output.writeFieldBegin('Name', Thrift.Type.STRING, 1);\n output.writeString(this.Name);\n output.writeFieldEnd();\n }\n if (this.Value !== null && this.Value !== undefined) {\n output.writeFieldBegin('Value', Thrift.Type.I64, 2);\n output.writeI64(this.Value);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.Runtime = function(args) {\n this.guid = null;\n this.start_micros = null;\n this.group_name = null;\n this.attrs = null;\n if (args) {\n if (args.guid !== undefined) {\n this.guid = args.guid;\n }\n if (args.start_micros !== undefined) {\n this.start_micros = args.start_micros;\n }\n if (args.group_name !== undefined) {\n this.group_name = args.group_name;\n }\n if (args.attrs !== undefined) {\n this.attrs = args.attrs;\n }\n }\n};\ncrouton_thrift.Runtime.prototype = {};\ncrouton_thrift.Runtime.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.start_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.group_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size0 = 0;\n var _rtmp34;\n this.attrs = [];\n var _etype3 = 0;\n _rtmp34 = input.readListBegin();\n _etype3 = _rtmp34.etype;\n _size0 = _rtmp34.size;\n for (var _i5 = 0; _i5 < _size0; ++_i5)\n {\n var elem6 = null;\n elem6 = new crouton_thrift.KeyValue();\n elem6.read(input);\n this.attrs.push(elem6);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.Runtime.prototype.write = false && function(output) {\n output.writeStructBegin('Runtime');\n if (this.guid !== null && this.guid !== undefined) {\n output.writeFieldBegin('guid', Thrift.Type.STRING, 1);\n output.writeString(this.guid);\n output.writeFieldEnd();\n }\n if (this.start_micros !== null && this.start_micros !== undefined) {\n output.writeFieldBegin('start_micros', Thrift.Type.I64, 2);\n output.writeI64(this.start_micros);\n output.writeFieldEnd();\n }\n if (this.group_name !== null && this.group_name !== undefined) {\n output.writeFieldBegin('group_name', Thrift.Type.STRING, 3);\n output.writeString(this.group_name);\n output.writeFieldEnd();\n }\n if (this.attrs !== null && this.attrs !== undefined) {\n output.writeFieldBegin('attrs', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.attrs.length);\n for (var iter7 in this.attrs)\n {\n if (this.attrs.hasOwnProperty(iter7))\n {\n iter7 = this.attrs[iter7];\n iter7.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.LogRecord = function(args) {\n this.timestamp_micros = null;\n this.fields = null;\n this.runtime_guid = null;\n this.span_guid = null;\n this.stable_name = null;\n this.message = null;\n this.level = null;\n this.thread_id = null;\n this.filename = null;\n this.line_number = null;\n this.stack_frames = null;\n this.payload_json = null;\n this.error_flag = null;\n if (args) {\n if (args.timestamp_micros !== undefined) {\n this.timestamp_micros = args.timestamp_micros;\n }\n if (args.fields !== undefined) {\n this.fields = args.fields;\n }\n if (args.runtime_guid !== undefined) {\n this.runtime_guid = args.runtime_guid;\n }\n if (args.span_guid !== undefined) {\n this.span_guid = args.span_guid;\n }\n if (args.stable_name !== undefined) {\n this.stable_name = args.stable_name;\n }\n if (args.message !== undefined) {\n this.message = args.message;\n }\n if (args.level !== undefined) {\n this.level = args.level;\n }\n if (args.thread_id !== undefined) {\n this.thread_id = args.thread_id;\n }\n if (args.filename !== undefined) {\n this.filename = args.filename;\n }\n if (args.line_number !== undefined) {\n this.line_number = args.line_number;\n }\n if (args.stack_frames !== undefined) {\n this.stack_frames = args.stack_frames;\n }\n if (args.payload_json !== undefined) {\n this.payload_json = args.payload_json;\n }\n if (args.error_flag !== undefined) {\n this.error_flag = args.error_flag;\n }\n }\n};\ncrouton_thrift.LogRecord.prototype = {};\ncrouton_thrift.LogRecord.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.timestamp_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 13:\n if (ftype == Thrift.Type.LIST) {\n var _size8 = 0;\n var _rtmp312;\n this.fields = [];\n var _etype11 = 0;\n _rtmp312 = input.readListBegin();\n _etype11 = _rtmp312.etype;\n _size8 = _rtmp312.size;\n for (var _i13 = 0; _i13 < _size8; ++_i13)\n {\n var elem14 = null;\n elem14 = new crouton_thrift.KeyValue();\n elem14.read(input);\n this.fields.push(elem14);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.runtime_guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.span_guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.stable_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.message = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.STRING) {\n this.level = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.I64) {\n this.thread_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.STRING) {\n this.filename = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.I64) {\n this.line_number = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 10:\n if (ftype == Thrift.Type.LIST) {\n var _size15 = 0;\n var _rtmp319;\n this.stack_frames = [];\n var _etype18 = 0;\n _rtmp319 = input.readListBegin();\n _etype18 = _rtmp319.etype;\n _size15 = _rtmp319.size;\n for (var _i20 = 0; _i20 < _size15; ++_i20)\n {\n var elem21 = null;\n elem21 = input.readString().value;\n this.stack_frames.push(elem21);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 11:\n if (ftype == Thrift.Type.STRING) {\n this.payload_json = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 12:\n if (ftype == Thrift.Type.BOOL) {\n this.error_flag = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.LogRecord.prototype.write = false && function(output) {\n output.writeStructBegin('LogRecord');\n if (this.timestamp_micros !== null && this.timestamp_micros !== undefined) {\n output.writeFieldBegin('timestamp_micros', Thrift.Type.I64, 1);\n output.writeI64(this.timestamp_micros);\n output.writeFieldEnd();\n }\n if (this.fields !== null && this.fields !== undefined) {\n output.writeFieldBegin('fields', Thrift.Type.LIST, 13);\n output.writeListBegin(Thrift.Type.STRUCT, this.fields.length);\n for (var iter22 in this.fields)\n {\n if (this.fields.hasOwnProperty(iter22))\n {\n iter22 = this.fields[iter22];\n iter22.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.runtime_guid !== null && this.runtime_guid !== undefined) {\n output.writeFieldBegin('runtime_guid', Thrift.Type.STRING, 2);\n output.writeString(this.runtime_guid);\n output.writeFieldEnd();\n }\n if (this.span_guid !== null && this.span_guid !== undefined) {\n output.writeFieldBegin('span_guid', Thrift.Type.STRING, 3);\n output.writeString(this.span_guid);\n output.writeFieldEnd();\n }\n if (this.stable_name !== null && this.stable_name !== undefined) {\n output.writeFieldBegin('stable_name', Thrift.Type.STRING, 4);\n output.writeString(this.stable_name);\n output.writeFieldEnd();\n }\n if (this.message !== null && this.message !== undefined) {\n output.writeFieldBegin('message', Thrift.Type.STRING, 5);\n output.writeString(this.message);\n output.writeFieldEnd();\n }\n if (this.level !== null && this.level !== undefined) {\n output.writeFieldBegin('level', Thrift.Type.STRING, 6);\n output.writeString(this.level);\n output.writeFieldEnd();\n }\n if (this.thread_id !== null && this.thread_id !== undefined) {\n output.writeFieldBegin('thread_id', Thrift.Type.I64, 7);\n output.writeI64(this.thread_id);\n output.writeFieldEnd();\n }\n if (this.filename !== null && this.filename !== undefined) {\n output.writeFieldBegin('filename', Thrift.Type.STRING, 8);\n output.writeString(this.filename);\n output.writeFieldEnd();\n }\n if (this.line_number !== null && this.line_number !== undefined) {\n output.writeFieldBegin('line_number', Thrift.Type.I64, 9);\n output.writeI64(this.line_number);\n output.writeFieldEnd();\n }\n if (this.stack_frames !== null && this.stack_frames !== undefined) {\n output.writeFieldBegin('stack_frames', Thrift.Type.LIST, 10);\n output.writeListBegin(Thrift.Type.STRING, this.stack_frames.length);\n for (var iter23 in this.stack_frames)\n {\n if (this.stack_frames.hasOwnProperty(iter23))\n {\n iter23 = this.stack_frames[iter23];\n output.writeString(iter23);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.payload_json !== null && this.payload_json !== undefined) {\n output.writeFieldBegin('payload_json', Thrift.Type.STRING, 11);\n output.writeString(this.payload_json);\n output.writeFieldEnd();\n }\n if (this.error_flag !== null && this.error_flag !== undefined) {\n output.writeFieldBegin('error_flag', Thrift.Type.BOOL, 12);\n output.writeBool(this.error_flag);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.TraceJoinId = function(args) {\n this.TraceKey = null;\n this.Value = null;\n if (args) {\n if (args.TraceKey !== undefined) {\n this.TraceKey = args.TraceKey;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field TraceKey is unset!');\n }\n if (args.Value !== undefined) {\n this.Value = args.Value;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');\n }\n }\n};\ncrouton_thrift.TraceJoinId.prototype = {};\ncrouton_thrift.TraceJoinId.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.TraceKey = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.Value = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.TraceJoinId.prototype.write = false && function(output) {\n output.writeStructBegin('TraceJoinId');\n if (this.TraceKey !== null && this.TraceKey !== undefined) {\n output.writeFieldBegin('TraceKey', Thrift.Type.STRING, 1);\n output.writeString(this.TraceKey);\n output.writeFieldEnd();\n }\n if (this.Value !== null && this.Value !== undefined) {\n output.writeFieldBegin('Value', Thrift.Type.STRING, 2);\n output.writeString(this.Value);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.SpanRecord = function(args) {\n this.span_guid = null;\n this.trace_guid = null;\n this.runtime_guid = null;\n this.span_name = null;\n this.join_ids = null;\n this.oldest_micros = null;\n this.youngest_micros = null;\n this.attributes = null;\n this.error_flag = null;\n this.log_records = null;\n if (args) {\n if (args.span_guid !== undefined) {\n this.span_guid = args.span_guid;\n }\n if (args.trace_guid !== undefined) {\n this.trace_guid = args.trace_guid;\n }\n if (args.runtime_guid !== undefined) {\n this.runtime_guid = args.runtime_guid;\n }\n if (args.span_name !== undefined) {\n this.span_name = args.span_name;\n }\n if (args.join_ids !== undefined) {\n this.join_ids = args.join_ids;\n }\n if (args.oldest_micros !== undefined) {\n this.oldest_micros = args.oldest_micros;\n }\n if (args.youngest_micros !== undefined) {\n this.youngest_micros = args.youngest_micros;\n }\n if (args.attributes !== undefined) {\n this.attributes = args.attributes;\n }\n if (args.error_flag !== undefined) {\n this.error_flag = args.error_flag;\n }\n if (args.log_records !== undefined) {\n this.log_records = args.log_records;\n }\n }\n};\ncrouton_thrift.SpanRecord.prototype = {};\ncrouton_thrift.SpanRecord.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.span_guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 11:\n if (ftype == Thrift.Type.STRING) {\n this.trace_guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.runtime_guid = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.span_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size24 = 0;\n var _rtmp328;\n this.join_ids = [];\n var _etype27 = 0;\n _rtmp328 = input.readListBegin();\n _etype27 = _rtmp328.etype;\n _size24 = _rtmp328.size;\n for (var _i29 = 0; _i29 < _size24; ++_i29)\n {\n var elem30 = null;\n elem30 = new crouton_thrift.TraceJoinId();\n elem30.read(input);\n this.join_ids.push(elem30);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I64) {\n this.oldest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I64) {\n this.youngest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.LIST) {\n var _size31 = 0;\n var _rtmp335;\n this.attributes = [];\n var _etype34 = 0;\n _rtmp335 = input.readListBegin();\n _etype34 = _rtmp335.etype;\n _size31 = _rtmp335.size;\n for (var _i36 = 0; _i36 < _size31; ++_i36)\n {\n var elem37 = null;\n elem37 = new crouton_thrift.KeyValue();\n elem37.read(input);\n this.attributes.push(elem37);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.BOOL) {\n this.error_flag = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 10:\n if (ftype == Thrift.Type.LIST) {\n var _size38 = 0;\n var _rtmp342;\n this.log_records = [];\n var _etype41 = 0;\n _rtmp342 = input.readListBegin();\n _etype41 = _rtmp342.etype;\n _size38 = _rtmp342.size;\n for (var _i43 = 0; _i43 < _size38; ++_i43)\n {\n var elem44 = null;\n elem44 = new crouton_thrift.LogRecord();\n elem44.read(input);\n this.log_records.push(elem44);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.SpanRecord.prototype.write = false && function(output) {\n output.writeStructBegin('SpanRecord');\n if (this.span_guid !== null && this.span_guid !== undefined) {\n output.writeFieldBegin('span_guid', Thrift.Type.STRING, 1);\n output.writeString(this.span_guid);\n output.writeFieldEnd();\n }\n if (this.trace_guid !== null && this.trace_guid !== undefined) {\n output.writeFieldBegin('trace_guid', Thrift.Type.STRING, 11);\n output.writeString(this.trace_guid);\n output.writeFieldEnd();\n }\n if (this.runtime_guid !== null && this.runtime_guid !== undefined) {\n output.writeFieldBegin('runtime_guid', Thrift.Type.STRING, 2);\n output.writeString(this.runtime_guid);\n output.writeFieldEnd();\n }\n if (this.span_name !== null && this.span_name !== undefined) {\n output.writeFieldBegin('span_name', Thrift.Type.STRING, 3);\n output.writeString(this.span_name);\n output.writeFieldEnd();\n }\n if (this.join_ids !== null && this.join_ids !== undefined) {\n output.writeFieldBegin('join_ids', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.join_ids.length);\n for (var iter45 in this.join_ids)\n {\n if (this.join_ids.hasOwnProperty(iter45))\n {\n iter45 = this.join_ids[iter45];\n iter45.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.oldest_micros !== null && this.oldest_micros !== undefined) {\n output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 5);\n output.writeI64(this.oldest_micros);\n output.writeFieldEnd();\n }\n if (this.youngest_micros !== null && this.youngest_micros !== undefined) {\n output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 6);\n output.writeI64(this.youngest_micros);\n output.writeFieldEnd();\n }\n if (this.attributes !== null && this.attributes !== undefined) {\n output.writeFieldBegin('attributes', Thrift.Type.LIST, 8);\n output.writeListBegin(Thrift.Type.STRUCT, this.attributes.length);\n for (var iter46 in this.attributes)\n {\n if (this.attributes.hasOwnProperty(iter46))\n {\n iter46 = this.attributes[iter46];\n iter46.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.error_flag !== null && this.error_flag !== undefined) {\n output.writeFieldBegin('error_flag', Thrift.Type.BOOL, 9);\n output.writeBool(this.error_flag);\n output.writeFieldEnd();\n }\n if (this.log_records !== null && this.log_records !== undefined) {\n output.writeFieldBegin('log_records', Thrift.Type.LIST, 10);\n output.writeListBegin(Thrift.Type.STRUCT, this.log_records.length);\n for (var iter47 in this.log_records)\n {\n if (this.log_records.hasOwnProperty(iter47))\n {\n iter47 = this.log_records[iter47];\n iter47.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.Auth = function(args) {\n this.access_token = null;\n if (args) {\n if (args.access_token !== undefined) {\n this.access_token = args.access_token;\n }\n }\n};\ncrouton_thrift.Auth.prototype = {};\ncrouton_thrift.Auth.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.access_token = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.Auth.prototype.write = false && function(output) {\n output.writeStructBegin('Auth');\n if (this.access_token !== null && this.access_token !== undefined) {\n output.writeFieldBegin('access_token', Thrift.Type.STRING, 1);\n output.writeString(this.access_token);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.Timing = function(args) {\n this.receive_micros = null;\n this.transmit_micros = null;\n if (args) {\n if (args.receive_micros !== undefined) {\n this.receive_micros = args.receive_micros;\n }\n if (args.transmit_micros !== undefined) {\n this.transmit_micros = args.transmit_micros;\n }\n }\n};\ncrouton_thrift.Timing.prototype = {};\ncrouton_thrift.Timing.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.receive_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.transmit_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.Timing.prototype.write = false && function(output) {\n output.writeStructBegin('Timing');\n if (this.receive_micros !== null && this.receive_micros !== undefined) {\n output.writeFieldBegin('receive_micros', Thrift.Type.I64, 1);\n output.writeI64(this.receive_micros);\n output.writeFieldEnd();\n }\n if (this.transmit_micros !== null && this.transmit_micros !== undefined) {\n output.writeFieldBegin('transmit_micros', Thrift.Type.I64, 2);\n output.writeI64(this.transmit_micros);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.SampleCount = function(args) {\n this.oldest_micros = null;\n this.youngest_micros = null;\n this.count = null;\n if (args) {\n if (args.oldest_micros !== undefined) {\n this.oldest_micros = args.oldest_micros;\n }\n if (args.youngest_micros !== undefined) {\n this.youngest_micros = args.youngest_micros;\n }\n if (args.count !== undefined) {\n this.count = args.count;\n }\n }\n};\ncrouton_thrift.SampleCount.prototype = {};\ncrouton_thrift.SampleCount.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.oldest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.youngest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.count = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.SampleCount.prototype.write = false && function(output) {\n output.writeStructBegin('SampleCount');\n if (this.oldest_micros !== null && this.oldest_micros !== undefined) {\n output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 1);\n output.writeI64(this.oldest_micros);\n output.writeFieldEnd();\n }\n if (this.youngest_micros !== null && this.youngest_micros !== undefined) {\n output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 2);\n output.writeI64(this.youngest_micros);\n output.writeFieldEnd();\n }\n if (this.count !== null && this.count !== undefined) {\n output.writeFieldBegin('count', Thrift.Type.I64, 3);\n output.writeI64(this.count);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.MetricsSample = function(args) {\n this.name = null;\n this.int64_value = null;\n this.double_value = null;\n if (args) {\n if (args.name !== undefined) {\n this.name = args.name;\n } else {\n throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');\n }\n if (args.int64_value !== undefined) {\n this.int64_value = args.int64_value;\n }\n if (args.double_value !== undefined) {\n this.double_value = args.double_value;\n }\n }\n};\ncrouton_thrift.MetricsSample.prototype = {};\ncrouton_thrift.MetricsSample.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.int64_value = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.DOUBLE) {\n this.double_value = input.readDouble().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.MetricsSample.prototype.write = false && function(output) {\n output.writeStructBegin('MetricsSample');\n if (this.name !== null && this.name !== undefined) {\n output.writeFieldBegin('name', Thrift.Type.STRING, 1);\n output.writeString(this.name);\n output.writeFieldEnd();\n }\n if (this.int64_value !== null && this.int64_value !== undefined) {\n output.writeFieldBegin('int64_value', Thrift.Type.I64, 2);\n output.writeI64(this.int64_value);\n output.writeFieldEnd();\n }\n if (this.double_value !== null && this.double_value !== undefined) {\n output.writeFieldBegin('double_value', Thrift.Type.DOUBLE, 3);\n output.writeDouble(this.double_value);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.Metrics = function(args) {\n this.counts = null;\n this.gauges = null;\n if (args) {\n if (args.counts !== undefined) {\n this.counts = args.counts;\n }\n if (args.gauges !== undefined) {\n this.gauges = args.gauges;\n }\n }\n};\ncrouton_thrift.Metrics.prototype = {};\ncrouton_thrift.Metrics.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size48 = 0;\n var _rtmp352;\n this.counts = [];\n var _etype51 = 0;\n _rtmp352 = input.readListBegin();\n _etype51 = _rtmp352.etype;\n _size48 = _rtmp352.size;\n for (var _i53 = 0; _i53 < _size48; ++_i53)\n {\n var elem54 = null;\n elem54 = new crouton_thrift.MetricsSample();\n elem54.read(input);\n this.counts.push(elem54);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size55 = 0;\n var _rtmp359;\n this.gauges = [];\n var _etype58 = 0;\n _rtmp359 = input.readListBegin();\n _etype58 = _rtmp359.etype;\n _size55 = _rtmp359.size;\n for (var _i60 = 0; _i60 < _size55; ++_i60)\n {\n var elem61 = null;\n elem61 = new crouton_thrift.MetricsSample();\n elem61.read(input);\n this.gauges.push(elem61);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.Metrics.prototype.write = false && function(output) {\n output.writeStructBegin('Metrics');\n if (this.counts !== null && this.counts !== undefined) {\n output.writeFieldBegin('counts', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.counts.length);\n for (var iter62 in this.counts)\n {\n if (this.counts.hasOwnProperty(iter62))\n {\n iter62 = this.counts[iter62];\n iter62.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.gauges !== null && this.gauges !== undefined) {\n output.writeFieldBegin('gauges', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRUCT, this.gauges.length);\n for (var iter63 in this.gauges)\n {\n if (this.gauges.hasOwnProperty(iter63))\n {\n iter63 = this.gauges[iter63];\n iter63.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.ReportRequest = function(args) {\n this.runtime = null;\n this.span_records = null;\n this.log_records = null;\n this.timestamp_offset_micros = null;\n this.oldest_micros = null;\n this.youngest_micros = null;\n this.counters = null;\n this.internal_logs = null;\n this.internal_metrics = null;\n if (args) {\n if (args.runtime !== undefined) {\n this.runtime = args.runtime;\n }\n if (args.span_records !== undefined) {\n this.span_records = args.span_records;\n }\n if (args.log_records !== undefined) {\n this.log_records = args.log_records;\n }\n if (args.timestamp_offset_micros !== undefined) {\n this.timestamp_offset_micros = args.timestamp_offset_micros;\n }\n if (args.oldest_micros !== undefined) {\n this.oldest_micros = args.oldest_micros;\n }\n if (args.youngest_micros !== undefined) {\n this.youngest_micros = args.youngest_micros;\n }\n if (args.counters !== undefined) {\n this.counters = args.counters;\n }\n if (args.internal_logs !== undefined) {\n this.internal_logs = args.internal_logs;\n }\n if (args.internal_metrics !== undefined) {\n this.internal_metrics = args.internal_metrics;\n }\n }\n};\ncrouton_thrift.ReportRequest.prototype = {};\ncrouton_thrift.ReportRequest.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.runtime = new crouton_thrift.Runtime();\n this.runtime.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size64 = 0;\n var _rtmp368;\n this.span_records = [];\n var _etype67 = 0;\n _rtmp368 = input.readListBegin();\n _etype67 = _rtmp368.etype;\n _size64 = _rtmp368.size;\n for (var _i69 = 0; _i69 < _size64; ++_i69)\n {\n var elem70 = null;\n elem70 = new crouton_thrift.SpanRecord();\n elem70.read(input);\n this.span_records.push(elem70);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size71 = 0;\n var _rtmp375;\n this.log_records = [];\n var _etype74 = 0;\n _rtmp375 = input.readListBegin();\n _etype74 = _rtmp375.etype;\n _size71 = _rtmp375.size;\n for (var _i76 = 0; _i76 < _size71; ++_i76)\n {\n var elem77 = null;\n elem77 = new crouton_thrift.LogRecord();\n elem77.read(input);\n this.log_records.push(elem77);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I64) {\n this.timestamp_offset_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.I64) {\n this.oldest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.I64) {\n this.youngest_micros = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.LIST) {\n var _size78 = 0;\n var _rtmp382;\n this.counters = [];\n var _etype81 = 0;\n _rtmp382 = input.readListBegin();\n _etype81 = _rtmp382.etype;\n _size78 = _rtmp382.size;\n for (var _i83 = 0; _i83 < _size78; ++_i83)\n {\n var elem84 = null;\n elem84 = new crouton_thrift.NamedCounter();\n elem84.read(input);\n this.counters.push(elem84);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 10:\n if (ftype == Thrift.Type.LIST) {\n var _size85 = 0;\n var _rtmp389;\n this.internal_logs = [];\n var _etype88 = 0;\n _rtmp389 = input.readListBegin();\n _etype88 = _rtmp389.etype;\n _size85 = _rtmp389.size;\n for (var _i90 = 0; _i90 < _size85; ++_i90)\n {\n var elem91 = null;\n elem91 = new crouton_thrift.LogRecord();\n elem91.read(input);\n this.internal_logs.push(elem91);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 11:\n if (ftype == Thrift.Type.STRUCT) {\n this.internal_metrics = new crouton_thrift.Metrics();\n this.internal_metrics.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.ReportRequest.prototype.write = false && function(output) {\n output.writeStructBegin('ReportRequest');\n if (this.runtime !== null && this.runtime !== undefined) {\n output.writeFieldBegin('runtime', Thrift.Type.STRUCT, 1);\n this.runtime.write(output);\n output.writeFieldEnd();\n }\n if (this.span_records !== null && this.span_records !== undefined) {\n output.writeFieldBegin('span_records', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.span_records.length);\n for (var iter92 in this.span_records)\n {\n if (this.span_records.hasOwnProperty(iter92))\n {\n iter92 = this.span_records[iter92];\n iter92.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.log_records !== null && this.log_records !== undefined) {\n output.writeFieldBegin('log_records', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.log_records.length);\n for (var iter93 in this.log_records)\n {\n if (this.log_records.hasOwnProperty(iter93))\n {\n iter93 = this.log_records[iter93];\n iter93.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.timestamp_offset_micros !== null && this.timestamp_offset_micros !== undefined) {\n output.writeFieldBegin('timestamp_offset_micros', Thrift.Type.I64, 5);\n output.writeI64(this.timestamp_offset_micros);\n output.writeFieldEnd();\n }\n if (this.oldest_micros !== null && this.oldest_micros !== undefined) {\n output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 7);\n output.writeI64(this.oldest_micros);\n output.writeFieldEnd();\n }\n if (this.youngest_micros !== null && this.youngest_micros !== undefined) {\n output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 8);\n output.writeI64(this.youngest_micros);\n output.writeFieldEnd();\n }\n if (this.counters !== null && this.counters !== undefined) {\n output.writeFieldBegin('counters', Thrift.Type.LIST, 9);\n output.writeListBegin(Thrift.Type.STRUCT, this.counters.length);\n for (var iter94 in this.counters)\n {\n if (this.counters.hasOwnProperty(iter94))\n {\n iter94 = this.counters[iter94];\n iter94.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.internal_logs !== null && this.internal_logs !== undefined) {\n output.writeFieldBegin('internal_logs', Thrift.Type.LIST, 10);\n output.writeListBegin(Thrift.Type.STRUCT, this.internal_logs.length);\n for (var iter95 in this.internal_logs)\n {\n if (this.internal_logs.hasOwnProperty(iter95))\n {\n iter95 = this.internal_logs[iter95];\n iter95.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.internal_metrics !== null && this.internal_metrics !== undefined) {\n output.writeFieldBegin('internal_metrics', Thrift.Type.STRUCT, 11);\n this.internal_metrics.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.Command = function(args) {\n this.disable = null;\n if (args) {\n if (args.disable !== undefined) {\n this.disable = args.disable;\n }\n }\n};\ncrouton_thrift.Command.prototype = {};\ncrouton_thrift.Command.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.BOOL) {\n this.disable = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.Command.prototype.write = false && function(output) {\n output.writeStructBegin('Command');\n if (this.disable !== null && this.disable !== undefined) {\n output.writeFieldBegin('disable', Thrift.Type.BOOL, 1);\n output.writeBool(this.disable);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\ncrouton_thrift.ReportResponse = function(args) {\n this.commands = null;\n this.timing = null;\n if (args) {\n if (args.commands !== undefined) {\n this.commands = args.commands;\n }\n if (args.timing !== undefined) {\n this.timing = args.timing;\n }\n }\n};\ncrouton_thrift.ReportResponse.prototype = {};\ncrouton_thrift.ReportResponse.prototype.read = false && function(input) {\n input.readStructBegin();\n while (true)\n {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid)\n {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size96 = 0;\n var _rtmp3100;\n this.commands = [];\n var _etype99 = 0;\n _rtmp3100 = input.readListBegin();\n _etype99 = _rtmp3100.etype;\n _size96 = _rtmp3100.size;\n for (var _i101 = 0; _i101 < _size96; ++_i101)\n {\n var elem102 = null;\n elem102 = new crouton_thrift.Command();\n elem102.read(input);\n this.commands.push(elem102);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.timing = new crouton_thrift.Timing();\n this.timing.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\ncrouton_thrift.ReportResponse.prototype.write = false && function(output) {\n output.writeStructBegin('ReportResponse');\n if (this.commands !== null && this.commands !== undefined) {\n output.writeFieldBegin('commands', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.commands.length);\n for (var iter103 in this.commands)\n {\n if (this.commands.hasOwnProperty(iter103))\n {\n iter103 = this.commands[iter103];\n iter103.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.timing !== null && this.timing !== undefined) {\n output.writeFieldBegin('timing', Thrift.Type.STRUCT, 2);\n this.timing.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\n\nmodule.exports.crouton_thrift = crouton_thrift;\nmodule.exports.Thrift = {}\n})();","/* global WorkerGlobalScope */\n// Find the HTML element that included the tracing library (if there is one).\n// This relies on the fact that scripts are executed as soon as they are\n// included -- thus 'this' script is the last one in the array at the time\n// this is run.\nlet hostScriptElement = (function () {\n // check to see if we're in a webworker\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {\n return null;\n }\n let scripts = document.getElementsByTagName('SCRIPT');\n if (!(scripts.length > 0)) {\n return null;\n }\n return scripts[scripts.length - 1];\n}());\n\nfunction urlQueryParameters(defaults) {\n let vars = {};\n let qi = window.location.href.indexOf('?');\n if (qi < 0) {\n return vars;\n }\n let slice = window.location.href.slice(qi + 1);\n if (slice.indexOf('#') >= 0) {\n slice = slice.slice(0, slice.indexOf('#'));\n }\n let hashes = slice.replace(/\\+/, '%20').split('&');\n for (let i = 0; i < hashes.length; i++) {\n let hash = hashes[i].split('=');\n vars[decodeURIComponent(hash[0])] = decodeURIComponent(hash[1]);\n }\n return vars;\n}\n\n// Parses options out of the host \n//\n// Note: relies on the global hostScriptElement variable defined above.\n//\nmodule.exports.parseScriptElementOptions = function (opts, browserOpts) {\n if (!hostScriptElement) {\n return;\n }\n\n let dataset = hostScriptElement.dataset;\n\n let accessToken = dataset.access_token;\n if (typeof accessToken === 'string' && accessToken.length > 0) {\n opts.access_token = accessToken;\n }\n\n let componentName = dataset.component_name;\n if (typeof componentName === 'string' && componentName.length > 0) {\n opts.component_name = componentName;\n }\n\n let collectorHost = dataset.collector_host;\n if (typeof collectorHost === 'string' && collectorHost.length > 0) {\n opts.collector_host = collectorHost;\n }\n let collectorPort = dataset.collector_port;\n if (collectorPort) {\n opts.collector_port = parseInt(collectorPort, 10);\n }\n let collectorPath = dataset.collector_path;\n if (typeof collectorPath === 'string' && collectorPath.length > 0) {\n opts.collector_path = collectorPath;\n }\n let collectorEncryption = dataset.collector_encryption;\n if (collectorEncryption) {\n opts.collector_encryption = collectorEncryption;\n }\n\n let enable = dataset.enable;\n if (typeof enable === 'string') {\n if (enable === 'true') {\n opts.enable = true;\n } else if (enable === 'false') {\n opts.enable = false;\n }\n }\n let verbosity = dataset.verbosity;\n if (typeof verbosity === 'string') {\n opts.verbosity = parseInt(verbosity, 10);\n }\n\n let init = dataset.init_global_tracer;\n if (typeof init === 'string') {\n if (init === 'true') {\n browserOpts.init_global_tracer = true;\n } else if (init === 'false') {\n browserOpts.init_global_tracer = false;\n }\n }\n\n // NOTE: this is a little inelegant as this is hard-coding support for a\n // \"plug-in\" option.\n if (typeof dataset.xhr_instrumentation === 'string' && dataset.xhr_instrumentation === 'true') {\n opts.xhr_instrumentation = true;\n }\n\n if (typeof dataset.instrument_page_load === 'string' && dataset.instrument_page_load === 'true') {\n opts.instrument_page_load = true;\n }\n};\n\n// Parses options out of the current URL query string. The query parameters use\n// the 'lightstep_' prefix to reduce the chance of collision with\n// application-specific query parameters.\n//\n// This mechanism is particularly useful for debugging purposes as it does not\n// require any code or configuration changes.\n//\nmodule.exports.parseURLQueryOptions = function (opts) {\n if (!window) {\n return;\n }\n\n let params = urlQueryParameters();\n if (params.lightstep_verbosity) {\n try {\n opts.verbosity = parseInt(params.lightstep_verbosity, 10);\n } catch (_ignored) { /* Ignored */ }\n }\n if (params.lightstep_log_to_console) {\n opts.log_to_console = true;\n }\n};\n","const optionsParser = require('./options_parser.js');\nconst util = require('./util');\n\nconst kRuntimeGUIDCookiePrefix = 'lightstep_guid';\nconst kSessionIDCookieKey = 'lightstep_session_id';\nconst kCookieTimeToLiveSeconds = 7 * 24 * 60 * 60;\n\nlet nowMicrosImp = (function () {\n // Is a hi-res timer available?\n if (window.performance &&\n window.performance.now &&\n window.performance.timing &&\n window.performance.timing.navigationStart) {\n let start = performance.timing.navigationStart;\n return function () {\n return Math.floor((start + performance.now()) * 1000.0);\n };\n }\n // The low-res timer is the best we can do\n return function () {\n return Date.now() * 1000.0;\n };\n}());\n\nclass PlatformBrowser {\n\n name() {\n return 'browser';\n }\n\n nowMicros() {\n return nowMicrosImp();\n }\n\n // Return the GUID to use for the runtime. The intention is to reuse the\n // GUID so that logically a single browser session looks like a single\n // runtime.\n runtimeGUID(groupName) {\n // Account for the groupName in the same that multiple apps or services\n // are running on the same domain (and should not share the same\n // runtime GUID).\n let cookieKey = `${kRuntimeGUIDCookiePrefix}/${groupName}`;\n let uuid = util.cookie(cookieKey) || this._generateLongUUID();\n util.cookie(cookieKey, uuid, kCookieTimeToLiveSeconds, '/');\n\n // Also create a session ID as well to give the server more information\n // to coordinate with.\n let sessionID = util.cookie(kSessionIDCookieKey) || this._generateLongUUID();\n util.cookie(kSessionIDCookieKey, sessionID, kCookieTimeToLiveSeconds, '/');\n\n return uuid;\n }\n\n generateUUID() {\n return this._generateLongUUID();\n }\n\n _generateLongUUID() {\n let p0 = `00000000${Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)}`.substr(-8);\n let p1 = `00000000${Math.abs((Math.random() * 0xFFFFFFFF) | 0).toString(16)}`.substr(-8);\n return `${p0}${p1}`;\n }\n\n onBeforeExit(...args) {\n if (window) {\n window.addEventListener('beforeunload', ...args);\n }\n }\n\n plugins(opts) {\n return [\n require('../../../plugins/instrument_xhr'),\n require('../../../plugins/instrument_document_load'),\n ];\n }\n\n options(imp) {\n let tracerOpts = {};\n let browserOpts = {};\n optionsParser.parseScriptElementOptions(tracerOpts, browserOpts);\n optionsParser.parseURLQueryOptions(tracerOpts, browserOpts);\n return tracerOpts;\n }\n\n static initLibrary(lib) {\n let tracerOpts = {};\n let browserOpts = {};\n optionsParser.parseScriptElementOptions(tracerOpts, browserOpts);\n\n if (browserOpts.init_global_tracer) {\n PlatformBrowser.initGlobalTracer(lib, tracerOpts);\n }\n }\n static initGlobalTracer(lib, opts) {\n if (typeof window !== 'object') {\n return;\n }\n if (typeof window.opentracing !== 'object') {\n return;\n }\n opentracing.initGlobalTracer(new lib.Tracer(opts)); // eslint-disable-line no-undef\n }\n\n tracerTags() {\n return {\n 'lightstep.tracer_platform' : 'browser',\n };\n }\n\n // There's no way to truly \"fatal\" on the browser; the best approximation\n // is an Error exception.\n fatal(message) {\n throw new Error(message);\n }\n\n localStoreGet(key) {\n if (!window.sessionStorage) {\n return null;\n }\n try {\n return JSON.parse(sessionStorage.getItem(`lightstep/${key}`));\n } catch (_ignored) {\n return null;\n }\n }\n\n localStoreSet(key, value) {\n if (!window.sessionStorage) {\n return;\n }\n try {\n sessionStorage.setItem(`lightstep/${key}`, JSON.stringify(value));\n } catch (_ignored) { /* Ignored */ }\n }\n}\n\nmodule.exports = PlatformBrowser;\n","module.exports = require('./generated/thrift_all.js').Thrift;\n","import { lightstep } from '../../generated_proto';\nlet proto = lightstep.collector;\n\nexport default class TransportBrowser {\n\n constructor() {\n this._host = '';\n this._port = 0;\n this._path = '';\n this._encryption = '';\n }\n\n ensureConnection(opts) {\n this._host = opts.collector_host;\n this._port = opts.collector_port;\n this._path = opts.collector_path;\n this._encryption = opts.collector_encryption;\n }\n\n report(detached, auth, report, done) {\n try {\n if (!detached) {\n this._reportAJAX(auth, report, done);\n }\n } catch (e) {\n return done(e, null);\n }\n }\n\n _reportAJAX(auth, report, done) {\n let reportProto = report.toProto(auth);\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/api/v2/reports`;\n let xhr = new XMLHttpRequest();\n xhr.responseType = 'arraybuffer';\n xhr.open('POST', url);\n // Note: the browser automatically sets 'Connection' and 'Content-Length'\n // and *does not* allow they to be set manually\n xhr.setRequestHeader('Accept', 'application/octet-stream');\n xhr.setRequestHeader('Content-Type', 'application/octet-stream');\n xhr.onreadystatechange = function () {\n if (this.readyState === 4) {\n let err = null;\n let resp = null;\n let jsonResp = null;\n if (this.status !== 200) {\n err = new Error(`status code = ${this.status}`);\n } else if (!this.response) {\n err = new Error('unexpected empty response');\n } else {\n try {\n resp = proto.ReportResponse.decode(new Uint8Array(this.response));\n\n jsonResp = {\n timing : {\n receive_micros : resp.receiveTimestamp,\n transmit_micros : resp.transmitTimestamp,\n },\n errors : resp.errors,\n };\n } catch (exception) {\n err = exception;\n }\n }\n return done(err, jsonResp);\n }\n };\n let serialized = proto.ReportRequest.encode(reportProto).finish();\n xhr.send(serialized);\n }\n}\n","export default class TransportBrowser {\n\n constructor() {\n this._host = '';\n this._port = 0;\n this._path = '';\n this._encryption = '';\n }\n\n ensureConnection(opts) {\n this._host = opts.collector_host;\n this._port = opts.collector_port;\n this._path = opts.collector_path;\n this._encryption = opts.collector_encryption;\n }\n\n report(detached, auth, report, done) {\n try {\n if (!detached) {\n this._reportAJAX(auth, report, done);\n } else {\n this._reportAsyncScript(auth, report, done);\n }\n } catch (e) {\n return done(e, null);\n }\n }\n\n _reportAJAX(auth, report, done) {\n let payload = JSON.stringify(report.toThrift());\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/api/v0/reports`;\n let xhr = new XMLHttpRequest();\n xhr.open('POST', url);\n // Note: the browser automatically sets 'Connection' and 'Content-Length'\n // and *does not* allow they to be set manually\n xhr.setRequestHeader('LightStep-Access-Token', auth.getAccessToken());\n xhr.setRequestHeader('Content-Type', 'application/json');\n //req.setRequestHeader('Content-Encoding', 'gzip');\n xhr.onreadystatechange = function () {\n if (this.readyState === 4) {\n let err = null;\n let resp = null;\n if (this.status !== 200) {\n err = new Error(`status code = ${this.status}`);\n } else if (!this.responseText) {\n err = new Error('unexpected empty response');\n } else {\n try {\n resp = JSON.parse(this.responseText);\n } catch (exception) {\n err = exception;\n }\n }\n return done(err, resp);\n }\n };\n xhr.send(payload);\n }\n\n // Do a \"tail flush\" using an async browser script load. This does not get\n // interrupted as a normal Thirft RPC would when navigating away from\n // the page.\n _reportAsyncScript(auth, report, done) {\n let authJSON = JSON.stringify(auth.toThrift());\n let reportJSON = JSON.stringify(report.toThrift());\n let protocol = (this._encryption === 'none') ? 'http' : 'https';\n let url = `${protocol}://${this._host}:${this._port}${this._path}/_rpc/v1/reports/uri_encoded` +\n `?auth=${encodeURIComponent(authJSON)}` +\n `&report=${encodeURIComponent(reportJSON)}`;\n\n let elem = document.createElement('script');\n elem.async = true;\n elem.defer = true;\n elem.src = url;\n elem.type = 'text/javascript';\n\n let hostElem = document.getElementsByTagName('head')[0];\n if (hostElem) {\n hostElem.appendChild(elem);\n }\n return done(null, null);\n }\n}\n","/* eslint-disable */\n\n// This function is copied directly from https://github.com/litejs/browser-cookie-lite.\n// It is licensed under the MIT License and authored by Lauri Rooden.\nfunction cookie(name, value, ttl, path, domain, secure) {\n if (arguments.length > 1) {\n let newCookie = name + '=' + encodeURIComponent(value) +\n (ttl ? \"; expires=\" + new Date(+new Date()+(ttl*1000)).toUTCString() : '') +\n (path ? \"; path=\" + path : '') +\n (domain ? \"; domain=\" + domain : '') +\n (secure ? \"; secure\" : '');\n document.cookie = newCookie;\n return newCookie;\n }\n return decodeURIComponent(((\"; \"+document.cookie).split(\"; \"+name+\"=\")[1]||\"\").split(\";\")[0]);\n}\n\n/* eslint-enable */\n\nmodule.exports = {\n cookie : cookie,\n};\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport _each from '../_each'; // eslint-disable-line camelcase\nimport * as coerce from './coerce.js';\nimport { lightstep } from './generated_proto';\nlet proto = lightstep.collector;\n\nexport default class ReportImp {\n constructor(runtime, oldestMicros, youngestMicros, spanRecords, internalLogs, counters, timestampOffsetMicros) {\n this._runtime = runtime;\n this._oldestMicros = oldestMicros;\n this._youngestMicros = youngestMicros;\n this._spanRecords = spanRecords;\n this._internalLogs = internalLogs;\n this._counters = counters;\n this._timestampOffsetMicros = timestampOffsetMicros;\n }\n\n getSpanRecords() {\n return this._spanRecords;\n }\n\n getInternalLogs() {\n return this._internalLogs;\n }\n\n getCounters() {\n return this._counters;\n }\n\n toThrift() {\n _each(this._spanRecords, (span) => {\n span.runtime_guid = this._runtimeGUID;\n });\n\n let thriftCounters = [];\n _each(this._counters, (value, key) => {\n if (value === 0) {\n return;\n }\n thriftCounters.push(new crouton_thrift.MetricsSample({\n name : coerce.toString(key),\n double_value : coerce.toNumber(value),\n }));\n });\n\n let thriftSpanRecords = [];\n _each(this._spanRecords, (spanRecord) => {\n thriftSpanRecords.push(spanRecord._toThrift());\n });\n\n return new crouton_thrift.ReportRequest({\n runtime : this._runtime.toThrift(),\n oldest_micros : this._oldestMicros,\n youngest_micros : this._youngestMicros,\n span_records : thriftSpanRecords,\n internal_logs : this._internalLogs,\n internal_metrics : new crouton_thrift.Metrics({\n counts : thriftCounters,\n }),\n timestamp_offset_micros : this._timestampOffsetMicros,\n });\n }\n\n toProto(auth) {\n let spansList = [];\n _each(this._spanRecords, (spanRecord) => {\n spansList.push(spanRecord._toProto());\n });\n\n let countsList = [];\n _each(this._counters, (count) => {\n let metricSample = new proto.MetricsSample();\n metricSample.name = count.name;\n metricSample.intValue = count.int64_value;\n metricSample.doubleValue = count.double_value;\n countsList.push(metricSample);\n });\n\n let internalMetrics = new proto.InternalMetrics();\n internalMetrics.counts = countsList;\n\n let reportProto = new proto.ReportRequest();\n reportProto.auth = auth.toProto();\n reportProto.reporter = this._runtime.toProto();\n reportProto.spans = spansList;\n reportProto.timestampOffsetMicros = this._timestampOffsetMicros;\n reportProto.internalMetrics = internalMetrics;\n return reportProto;\n }\n}\n","import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport _each from '../_each'; // eslint-disable-line camelcase\nimport * as coerce from './coerce.js';\nimport { lightstep } from './generated_proto';\nlet proto = lightstep.collector;\nlet converter = require('hex2dec');\nconst packageObject = require('../../package.json');\n\nexport default class RuntimeImp {\n constructor(runtimeGUID, startMicros, componentName, attributes) {\n this._runtimeGUID = runtimeGUID;\n this._startMicros = startMicros;\n this._componentName = componentName;\n this._attributes = attributes;\n }\n\n toThrift() {\n let thriftAttrs = [];\n _each(this._attributes, (val, key) => {\n thriftAttrs.push(new crouton_thrift.KeyValue({\n Key : coerce.toString(key),\n Value : coerce.toString(val),\n }));\n });\n\n // NOTE: for legacy reasons, the Thrift field is called \"group_name\"\n // but is semantically equivalent to the \"component_name\"\n return new crouton_thrift.Runtime({\n guid : this._runtimeGUID,\n start_micros : this._startMicros,\n group_name : this._componentName,\n attrs : thriftAttrs,\n });\n }\n\n toProto() {\n let tracerVersion = new proto.KeyValue();\n tracerVersion.key = 'lightstep.tracer_version';\n tracerVersion.stringValue = packageObject.version;\n\n let tracerPlatform = new proto.KeyValue();\n tracerPlatform.key = 'lightstep.tracer_platform';\n tracerPlatform.stringValue = 'browser';\n\n let componentName = new proto.KeyValue();\n componentName.key = 'lightstep.component_name';\n componentName.stringValue = this._componentName;\n\n let reporterId = parseInt(converter.hexToDec(this._runtimeGUID), 10);\n\n let reporterProto = new proto.Reporter();\n reporterProto.reporterId = reporterId;\n reporterProto.tags = [tracerVersion, tracerPlatform, componentName];\n return reporterProto;\n }\n}\n","import _each from '../_each';\n\nexport default class SpanContextImp {\n\n // ---------------------------------------------------------------------- //\n // OpenTracing Implementation\n // ---------------------------------------------------------------------- //\n\n setBaggageItem(key, value) {\n this._baggage[key] = value;\n }\n\n getBaggageItem(key) {\n return this._baggage[key];\n }\n\n // ---------------------------------------------------------------------- //\n // LightStep Extensions\n // ---------------------------------------------------------------------- //\n\n // This is part of the formal OT API in Go; and will likely be supported\n // across platforms.\n //\n // https://github.com/opentracing/opentracing.github.io/issues/103\n forEachBaggageItem(f) {\n _each(this._baggage, (val, key) => {\n f(key, val);\n });\n }\n\n // ---------------------------------------------------------------------- //\n // Private methods\n // ---------------------------------------------------------------------- //\n\n constructor(spanGUID, traceGUID) {\n this._baggage = {};\n this._guid = spanGUID;\n this._traceGUID = traceGUID;\n }\n}\n","import * as coerce from './coerce.js';\nimport * as constants from '../constants';\nimport _each from '../_each';\nimport * as opentracing from 'opentracing';\nimport { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase\nimport LogRecordImp from './log_record_imp'; // eslint-disable-line camelcase\nimport { lightstep, google } from './generated_proto';\nlet converter = require('hex2dec');\nlet proto = lightstep.collector;\nlet googleProtobufTimestampPB = google.proto;\n\nexport default class SpanImp extends opentracing.Span {\n\n // ---------------------------------------------------------------------- //\n // opentracing.Span SPI\n // ---------------------------------------------------------------------- //\n\n _tracer() {\n return this._tracerImp;\n }\n\n _context() {\n return this._ctx;\n }\n\n _setOperationName(name) {\n this._operationName = `${name}`;\n }\n\n _addTags(keyValuePairs) {\n let self = this;\n _each(keyValuePairs, (value, key) => {\n self._tags[key] = value;\n });\n }\n\n _log(keyValuePairs, timestamp) {\n let self = this;\n const argumentType = typeof keyValuePairs;\n if (argumentType !== 'object') {\n self._tracerImp._error('Span.log() expects an object as its first argument');\n return;\n }\n\n let tsMicros = timestamp ?\n (timestamp * 1000) :\n self._tracerImp._platform.nowMicros();\n\n let record = new LogRecordImp(\n self._tracerImp.getLogFieldKeyHardLimit(),\n self._tracerImp.getLogFieldValueHardLimit(),\n tsMicros,\n keyValuePairs);\n self._log_records = self._log_records || [];\n self._log_records.push(record);\n self._tracerImp.emit('log_added', record);\n }\n\n _finish(finishTime) {\n return this.end(finishTime);\n }\n\n // ---------------------------------------------------------------------- //\n // Private methods\n // ---------------------------------------------------------------------- //\n\n constructor(tracer, name, spanContext) {\n super();\n\n console.assert(typeof tracer === 'object', 'Invalid runtime'); // eslint-disable-line no-console\n\n this._tracerImp = tracer;\n this._ctx = spanContext;\n this._ended = false;\n\n this._operationName = name;\n this._tags = {};\n this._beginMicros = tracer._platform.nowMicros();\n this._endMicros = 0;\n this._errorFlag = false;\n this._log_records = null;\n }\n\n // ---------------------------------------------------------------------- //\n // LightStep Extensions\n // ---------------------------------------------------------------------- //\n\n getOperationName() {\n return this._operationName;\n }\n\n // Getter only. The GUID is immutable once set internally.\n guid() {\n return this._ctx._guid;\n }\n\n traceGUID() {\n return this._ctx._traceGUID;\n }\n\n parentGUID() {\n return this._tags.parent_span_guid;\n }\n\n setParentGUID(guid) {\n this._tags.parent_span_guid = coerce.toString(guid);\n return this;\n }\n\n beginMicros() {\n return this._beginMicros;\n }\n\n setBeginMicros(micros) {\n this._beginMicros = micros;\n return this;\n }\n\n endMicros() {\n return this._endMicros;\n }\n\n setEndMicros(micros) {\n this._endMicros = micros;\n return this;\n }\n\n /**\n * Returns a URL to the trace containing this span.\n *\n * Unlike most methods, it *is* safe to call this method after `finish()`.\n *\n * @return {string} the absolute URL for the span\n */\n generateTraceURL() {\n let micros;\n if (this._beginMicros > 0 && this._endMicros > 0) {\n micros = Math.floor((this._beginMicros + this._endMicros) / 2);\n } else {\n micros = this._tracerImp._platform.nowMicros();\n }\n\n let urlPrefix = constants.LIGHTSTEP_APP_URL_PREFIX;\n let accessToken = encodeURIComponent(this._tracerImp.options().access_token);\n let guid = encodeURIComponent(this.guid());\n return `${urlPrefix}/${accessToken}/trace?span_guid=${guid}&at_micros=${micros}`;\n }\n\n getTags() {\n return this._tags;\n }\n\n /**\n * Finishes the span.\n *\n * @param {Number} finishTime\n * \tOptional Unix timestamp in milliseconds setting an explicit\n * \tfinish time for the span.\n */\n end(finishTime) {\n // Ensure a single span is not recorded multiple times\n if (this._ended) {\n return;\n }\n this._ended = true;\n\n if (finishTime !== undefined) {\n this._endMicros = finishTime * 1000;\n }\n\n // Do not set endMicros if it has already been set. This accounts for\n // the case of a span that has had it's times set manually (i.e. allows\n // for retroactively created spans that might not be possible to create\n // in real-time).\n if (this._endMicros === 0) {\n this._endMicros = this._tracerImp._platform.nowMicros();\n }\n this._tracerImp._addSpanRecord(this);\n }\n\n _toThrift() {\n let attributes = [];\n _each(this._tags, (value, key) => {\n attributes.push(new crouton_thrift.KeyValue({\n Key : coerce.toString(key),\n Value : coerce.toString(value),\n }));\n });\n\n let logs = [];\n _each(this._log_records, (logRecord) => {\n let logThrift = logRecord.toThrift();\n this._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit();\n this._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit();\n logs.push(logThrift);\n });\n\n return new crouton_thrift.SpanRecord({\n span_guid : this.guid(),\n trace_guid : this.traceGUID(),\n runtime_guid : this._tracerImp.guid(),\n span_name : this._operationName,\n oldest_micros : this._beginMicros,\n youngest_micros : this._endMicros,\n attributes : attributes,\n error_flag : this._errorFlag,\n log_records : logs,\n });\n }\n\n _toProto() {\n let spanContextProto = new proto.SpanContext();\n\n spanContextProto.traceId = converter.hexToDec(this.traceGUID());\n spanContextProto.spanId = converter.hexToDec(this.guid());\n\n let spanProto = new proto.Span();\n spanProto.spanContext = spanContextProto;\n spanProto.operationName = this._operationName;\n\n let startTimestamp = new googleProtobufTimestampPB.Timestamp();\n let startMillis = Math.floor(this._beginMicros / 1000);\n let startSeconds = Math.floor(startMillis / 1000);\n let startNanos = (startMillis % 1000) * 1000000;\n startTimestamp.seconds = startSeconds;\n startTimestamp.nanos = startNanos;\n spanProto.startTimestamp = startTimestamp;\n spanProto.durationMicros = this._endMicros - this._beginMicros;\n\n let logs = [];\n _each(this._log_records, (logRecord) => {\n let logProto = logRecord.toProto();\n this._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit();\n this._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit();\n logs.push(logProto);\n });\n spanProto.logs = logs;\n\n let parentSpanGUID = undefined;\n let tags = [];\n _each(this._tags, (value, key) => {\n let strValue = coerce.toString(value);\n let strKey = coerce.toString(key);\n let tag = new proto.KeyValue();\n if (strKey === 'parent_span_guid') {\n parentSpanGUID = strValue;\n }\n tag.key = strKey;\n tag.stringValue = strValue;\n tags.push(tag);\n });\n spanProto.tags = tags;\n\n if (parentSpanGUID !== undefined) {\n let ref = new proto.Reference();\n ref.relationship = proto.Reference.Relationship.CHILD_OF;\n let parentSpanContext = new proto.SpanContext();\n parentSpanContext.spanId = converter.hexToDec(parentSpanGUID);\n ref.spanContext = parentSpanContext;\n spanProto.references = [ref];\n }\n\n return spanProto;\n }\n}\n","//============================================================================//\n// Imports\n//============================================================================//\n\nimport EventEmitter from 'eventemitter3';\nimport * as opentracing from 'opentracing';\n\nimport SpanContextImp from './span_context_imp';\nimport SpanImp from './span_imp';\nimport _each from '../_each';\nimport { Platform, ProtoTransport, ThriftTransport } from '../platform_abstraction_layer';\nimport AuthImp from './auth_imp';\nimport RuntimeImp from './runtime_imp';\nimport ReportImp from './report_imp';\n\nconst ClockState = require('./util/clock_state');\nconst LogBuilder = require('./log_builder');\nconst coerce = require('./coerce');\nconst constants = require('../constants');\nconst globals = require('./globals');\nconst packageObject = require('../../package.json');\nconst util = require('./util/util');\n\nconst CARRIER_TRACER_STATE_PREFIX = 'ot-tracer-';\nconst CARRIER_BAGGAGE_PREFIX = 'ot-baggage-';\n\nconst DEFAULT_COLLECTOR_HOSTNAME = 'collector.lightstep.com';\nconst DEFAULT_COLLECTOR_PORT_TLS = 443;\nconst DEFAULT_COLLECTOR_PORT_PLAIN = 80;\nconst DEFAULT_COLLECTOR_PATH = '';\n\n// Internal errors should be rare. Set a low limit to ensure a cascading failure\n// does not compound an existing problem by trying to send a great deal of\n// internal error data.\nconst MAX_INTERNAL_LOGS = 20;\n\nlet _singleton = null;\n\nexport default class Tracer extends opentracing.Tracer {\n\n constructor(opts) {\n super();\n\n this._delegateEventEmitterMethods();\n\n opts = opts || {};\n\n if (!_singleton) {\n globals.setOptions(opts);\n _singleton = this;\n }\n\n // Platform abstraction layer\n this._platform = new Platform(this);\n this._runtimeGUID = opts.guid || this.override_runtime_guid || null; // Set once the group name is set\n this._plugins = {};\n this._options = {};\n this._optionDescs = [];\n this._makeOptionsTable();\n\n this._opentracing = opentracing;\n if (opts.opentracing_module) {\n this._opentracing = opts.opentracing_module;\n }\n\n let now = this._platform.nowMicros();\n\n // The thrift authentication and runtime struct are created as soon as\n // the necessary initialization options are available.\n this._startMicros = now;\n this._auth = null;\n this._runtime = null;\n\n let logger = {\n warn : (msg, payload) => { this._warn(msg, payload); },\n error : (err, payload) => { this._error(err, payload); },\n };\n\n if (opts) {\n this._transport = opts.override_transport;\n }\n\n if (!this._transport) {\n if (opts.transport && opts.transport === 'proto') {\n this._transport = new ProtoTransport(logger);\n } else {\n this._transport = new ThriftTransport(logger);\n }\n }\n\n this._reportingLoopActive = false;\n this._reportYoungestMicros = now;\n this._reportTimer = null;\n this._reportErrorStreak = 0; // Number of consecutive errors\n this._lastVisibleErrorMillis = 0;\n this._skippedVisibleErrors = 0;\n\n // Set addActiveRootSpan() for detail\n this._activeRootSpanSet = {};\n this._activeRootSpan = null;\n\n // Span reporting buffer and per-report data\n // These data are reset on every successful report.\n this._spanRecords = [];\n\n // The counter names need to match those accepted by the collector.\n // These are internal counters only.\n this._counters = {\n 'internal.errors' : 0,\n 'internal.warnings' : 0,\n 'spans.dropped' : 0,\n 'logs.dropped' : 0,\n 'logs.keys.over_limit' : 0,\n 'logs.values.over_limit' : 0,\n 'reports.errors.send' : 0,\n };\n\n // For internal (not client) logs reported to the collector\n this._internalLogs = [];\n\n // Current runtime state / status\n this._flushIsActive = false;\n\n // Built-in plugins\n this.addPlugin(require('../plugins/log_to_console'));\n\n // Initialize the platform options after the built-in plugins in\n // case any of those options affect the built-ins.\n this.addPlatformPlugins(opts);\n this.setPlatformOptions(opts);\n\n // Set constructor arguments\n if (opts) {\n this.options(opts);\n }\n\n // For clock skew adjustment.\n // Must be set after options have been set.\n this._useClockState = !this._options.disable_clock_skew_correction;\n this._clockState = new ClockState({\n nowMicros : () => this._platform.nowMicros(),\n localStoreGet : () => {\n let key = `clock_state/${this._options.collector_host}`;\n return this._platform.localStoreGet(key);\n },\n localStoreSet : (value) => {\n let key = `clock_state/${this._options.collector_host}`;\n return this._platform.localStoreSet(key, value);\n },\n });\n\n // This relies on the options being set: call this last.\n this._setupReportOnExit();\n\n this._info(`Tracer created with guid ${this._runtimeGUID}`);\n\n this.startPlugins();\n }\n\n // Morally speaking, Tracer also inherits from EventEmmiter, but we must\n // fake it via composition.\n //\n // If not obvious on inspection: a hack.\n _delegateEventEmitterMethods() {\n let self = this;\n this._ee = new EventEmitter();\n // The list of methods at https://nodejs.org/api/events.html\n _each([\n 'addListener',\n 'emit',\n 'eventNames',\n 'getMaxListeners',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener',\n 'setMaxListeners',\n ], (methodName) => {\n self[methodName] = function () {\n if (self._ee[methodName]) {\n self._ee[methodName].apply(self._ee, arguments);\n }\n };\n });\n }\n\n _makeOptionsTable() {\n /* eslint-disable key-spacing, no-multi-spaces */\n\n // NOTE: make 'verbosity' the first option so it is processed first on\n // options changes and takes effect as soon as possible.\n this.addOption('verbosity', { type : 'int', min: 0, max: 9, defaultValue: 1 });\n\n // Core options\n this.addOption('access_token', { type: 'string', defaultValue: '' });\n this.addOption('component_name', { type: 'string', defaultValue: '' });\n this.addOption('collector_host', { type: 'string', defaultValue: DEFAULT_COLLECTOR_HOSTNAME });\n this.addOption('collector_port', { type: 'int', defaultValue: DEFAULT_COLLECTOR_PORT_TLS });\n this.addOption('collector_path', { type: 'string', defaultValue: DEFAULT_COLLECTOR_PATH });\n this.addOption('collector_encryption', { type: 'string', defaultValue: 'tls' });\n this.addOption('tags', { type: 'any', defaultValue: {} });\n this.addOption('max_reporting_interval_millis', { type: 'int', defaultValue: 2500 });\n this.addOption('disable_clock_skew_correction', { type: 'bool', defaultValue: false });\n\n // Non-standard, may be deprecated\n this.addOption('disabled', { type: 'bool', defaultValue: false });\n this.addOption('max_span_records', { type: 'int', defaultValue: 4096 });\n this.addOption('default_span_tags', { type: 'any', defaultValue: {} });\n this.addOption('report_timeout_millis', { type: 'int', defaultValue: 30000 });\n this.addOption('gzip_json_requests', { type: 'bool', defaultValue: true });\n this.addOption('disable_reporting_loop', { type: 'bool', defaultValue: false });\n this.addOption('disable_report_on_exit', { type: 'bool', defaultValue: false });\n this.addOption('delay_initial_report_millis', { type: 'int', defaultValue: 1000 });\n this.addOption('error_throttle_millis', { type: 'int', defaultValue: 60000 });\n\n // Debugging options\n //\n // These are not part of the supported public API.\n //\n // If false, SSL certificate verification is skipped. Useful for testing.\n this.addOption('certificate_verification', { type: 'bool', defaultValue: true });\n // I.e. report only on explicit calls to flush()\n\n // Unit testing options\n this.addOption('override_transport', { type : 'any', defaultValue: null });\n this.addOption('silent', { type : 'bool', defaultValue: false });\n\n // Hard upper limits to protect against worst-case scenarios for log field sizes.\n this.addOption('log_field_key_hard_limit', { type: 'int', defaultValue: 256 });\n this.addOption('log_field_value_hard_limit', { type: 'int', defaultValue: 1024 });\n\n /* eslint-disable key-spacing, no-multi-spaces */\n }\n\n // ---------------------------------------------------------------------- //\n // opentracing.Tracer SPI\n // ---------------------------------------------------------------------- //\n\n _startSpan(name, fields) {\n // First, assemble the SpanContextImp for our SpanImp.\n let parentCtxImp = null;\n fields = fields || {};\n if (fields.references) {\n for (let i = 0; i < fields.references.length; i++) {\n let ref = fields.references[i];\n let type = ref.type();\n if (type === this._opentracing.REFERENCE_CHILD_OF ||\n type === this._opentracing.REFERENCE_FOLLOWS_FROM) {\n let context = ref.referencedContext();\n if (!context) {\n this._error('Span reference has an invalid context', context);\n continue;\n }\n parentCtxImp = context;\n break;\n }\n }\n }\n\n let traceGUID = parentCtxImp ? parentCtxImp._traceGUID : this.generateTraceGUIDForRootSpan();\n let spanImp = new SpanImp(this, name, new SpanContextImp(this._platform.generateUUID(), traceGUID));\n spanImp.addTags(this._options.default_span_tags);\n\n _each(fields, (value, key) => {\n switch (key) {\n case 'references':\n // Ignore: handled before constructing the span\n break;\n case 'startTime':\n // startTime is in milliseconds\n spanImp.setBeginMicros(value * 1000);\n break;\n case 'tags':\n spanImp.addTags(value);\n break;\n default:\n this._warn(`Ignoring unknown field '${key}'`);\n break;\n }\n });\n\n if (parentCtxImp !== null) {\n spanImp.setParentGUID(parentCtxImp._guid);\n }\n\n this.emit('start_span', spanImp);\n return spanImp;\n }\n\n _inject(spanContext, format, carrier) {\n switch (format) {\n case this._opentracing.FORMAT_HTTP_HEADERS:\n case this._opentracing.FORMAT_TEXT_MAP:\n this._injectToTextMap(spanContext, carrier);\n break;\n\n case this._opentracing.FORMAT_BINARY:\n this._error(`Unsupported format: ${format}`);\n break;\n\n default:\n this._error(`Unknown format: ${format}`);\n break;\n }\n }\n\n _injectToTextMap(spanContext, carrier) {\n if (!carrier) {\n this._error('Unexpected null FORMAT_TEXT_MAP carrier in call to inject');\n return;\n }\n if (typeof carrier !== 'object') {\n this._error(`Unexpected '${typeof carrier}' FORMAT_TEXT_MAP carrier in call to inject`);\n return;\n }\n\n carrier[`${CARRIER_TRACER_STATE_PREFIX}spanid`] = spanContext._guid;\n carrier[`${CARRIER_TRACER_STATE_PREFIX}traceid`] = spanContext._traceGUID;\n spanContext.forEachBaggageItem((key, value) => {\n carrier[`${CARRIER_BAGGAGE_PREFIX}${key}`] = value;\n });\n carrier[`${CARRIER_TRACER_STATE_PREFIX}sampled`] = 'true';\n return carrier;\n }\n\n _extract(format, carrier) {\n switch (format) {\n case this._opentracing.FORMAT_HTTP_HEADERS:\n case this._opentracing.FORMAT_TEXT_MAP:\n return this._extractTextMap(format, carrier);\n\n case this._opentracing.FORMAT_BINARY:\n this._error(`Unsupported format: ${format}`);\n return null;\n\n default:\n this._error(`Unsupported format: ${format}`);\n return null;\n }\n }\n\n _extractTextMap(format, carrier) {\n // Begin with the empty SpanContextImp\n let spanContext = new SpanContextImp(null, null);\n\n // Iterate over the contents of the carrier and set the properties\n // accordingly.\n let foundFields = 0;\n _each(carrier, (value, key) => {\n key = key.toLowerCase();\n if (key.substr(0, CARRIER_TRACER_STATE_PREFIX.length) !== CARRIER_TRACER_STATE_PREFIX) {\n return;\n }\n let suffix = key.substr(CARRIER_TRACER_STATE_PREFIX.length);\n\n switch (suffix) {\n case 'traceid':\n foundFields++;\n spanContext._traceGUID = value;\n break;\n case 'spanid':\n foundFields++;\n spanContext._guid = value;\n break;\n case 'sampled':\n // Ignored. The carrier may be coming from a different client\n // library that sends this (even though it's not used).\n break;\n default:\n this._error(`Unrecognized carrier key '${key}' with recognized prefix. Ignoring.`);\n break;\n }\n });\n\n if (foundFields === 0) {\n // This is not an error per se, there was simply no SpanContext\n // in the carrier.\n return null;\n }\n if (foundFields < 2) {\n // A partial SpanContext suggests some sort of data corruption.\n this._error(`Only found a partial SpanContext: ${format}, ${carrier}`);\n return null;\n }\n\n _each(carrier, (value, key) => {\n key = key.toLowerCase();\n if (key.substr(0, CARRIER_BAGGAGE_PREFIX.length) !== CARRIER_BAGGAGE_PREFIX) {\n return;\n }\n let suffix = key.substr(CARRIER_BAGGAGE_PREFIX.length);\n spanContext.setBaggageItem(suffix, value);\n });\n return spanContext;\n }\n\n\n // ---------------------------------------------------------------------- //\n // LightStep extensions\n // ---------------------------------------------------------------------- //\n\n /**\n * Manually sends a report of all buffered data.\n *\n * @param {Function} done - callback function invoked when the report\n * either succeeds or fails.\n */\n flush(done) {\n if (!done) {\n done = function () {};\n }\n if (this._options.disabled) {\n this._warn('Manual flush() called in disabled state.');\n return done(null);\n }\n this._flushReport(true, false, done);\n }\n\n //-----------------------------------------------------------------------//\n // Options\n //-----------------------------------------------------------------------//\n\n guid() {\n return this._runtimeGUID;\n }\n\n verbosity() {\n // The 'undefined' handling below is for logs that may occur before the\n // options are initialized.\n let v = this._options.verbosity;\n return (v === undefined) ? 1 : v;\n }\n\n // Call to generate a new Trace GUID\n generateTraceGUIDForRootSpan() {\n let guid = this._platform.generateUUID();\n if (this._activeRootSpan) {\n guid = this._activeRootSpan.traceGUID();\n }\n return guid;\n }\n\n setPlatformOptions(userOptions) {\n let opts = this._platform.options(this) || {};\n _each(userOptions, (val, key) => {\n opts[key] = val;\n });\n this.options(opts);\n }\n\n // Register a new option. Used by plug-ins.\n addOption(name, desc) {\n desc.name = name;\n this._optionDescs.push(desc);\n this._options[desc.name] = desc.defaultValue;\n }\n\n options(opts) {\n if (arguments.length === 0) {\n console.assert(typeof this._options === 'object', // eslint-disable-line\n 'Internal error: _options field incorrect');\n return this._options;\n }\n if (typeof opts !== 'object') {\n throw new Error(`options() must be called with an object: type was ${typeof opts}`);\n }\n\n // \"collector_port\" 0 acts as an alias for \"use the default\".\n if (opts.collector_port === 0) {\n delete opts.collector_port;\n }\n\n // \"collector_encryption\" acts an alias for the common cases of 'collector_port'\n if (opts.collector_encryption !== undefined && opts.collector_port === undefined) {\n opts.collector_port = opts.collector_encryption !== 'none' ?\n DEFAULT_COLLECTOR_PORT_TLS :\n DEFAULT_COLLECTOR_PORT_PLAIN;\n }\n\n // Track what options have been modified\n let modified = {};\n let unchanged = {};\n _each(this._optionDescs, (desc) => {\n this._setOptionInternal(modified, unchanged, opts, desc);\n });\n\n // Check for any invalid options: is there a key in the specified operation\n // that didn't result either in a change or a reset to the existing value?\n for (let key in opts) {\n if (modified[key] === undefined && unchanged[key] === undefined) {\n this._warn(`Invalid option ${key} with value ${opts[key]}`);\n }\n }\n\n //\n // Update the state information based on the changes\n //\n this._initReportingDataIfNeeded(modified);\n\n if (!this._reportingLoopActive) {\n this._startReportingLoop();\n }\n\n if (this.verbosity() >= 3) {\n let optionsString = '';\n let count = 0;\n _each(modified, (val, key) => {\n optionsString += `\\t${JSON.stringify(key)}: ${JSON.stringify(val.newValue)}\\n`;\n count++;\n });\n if (count > 0) {\n this._debug(`Options modified:\\n${optionsString}`);\n }\n }\n this.emit('options', modified, this._options, this);\n }\n\n _setOptionInternal(modified, unchanged, opts, desc) {\n let name = desc.name;\n let value = opts[name];\n let valueType = typeof value;\n if (value === undefined) {\n return;\n }\n\n // Parse the option (and check constraints)\n switch (desc.type) {\n\n case 'any':\n break;\n\n case 'bool':\n if (value !== true && value !== false) {\n this._error(`Invalid boolean option '${name}' '${value}'`);\n return;\n }\n break;\n\n case 'int':\n if (valueType !== 'number' || Math.floor(value) !== value) {\n this._error(`Invalid int option '${name}' '${value}'`);\n return;\n }\n if (desc.min !== undefined && desc.max !== undefined) {\n if (!(value >= desc.min && value <= desc.max)) {\n this._error(`Option '${name}' out of range '${value}' is not between ${desc.min} and ${desc.max}`); // eslint-disable-line max-len\n return;\n }\n }\n break;\n\n case 'string':\n switch (valueType) {\n case 'string':\n break;\n case 'number':\n value = coerce.toString(value);\n break;\n default:\n this._error(`Invalid string option ${name} ${value}`);\n return;\n }\n break;\n\n case 'array':\n // Per http://stackoverflow.com/questions/4775722/check-if-object-is-array\n if (Object.prototype.toString.call(value) !== '[object Array]') {\n this._error(`Invalid type for array option ${name}: found '${valueType}'`);\n return;\n }\n break;\n\n default:\n this._error(`Unknown option type '${desc.type}'`);\n return;\n }\n\n // Set the new value, recording any modifications\n let oldValue = this._options[name];\n if (oldValue === undefined) {\n throw new Error(`Attempt to set unknown option ${name}`);\n }\n\n // Ignore no-op changes for types that can be checked quickly\n if (valueType !== 'object' && oldValue === value) {\n unchanged[name] = true;\n return;\n }\n\n modified[name] = {\n oldValue : oldValue,\n newValue : value,\n };\n this._options[name] = value;\n }\n\n // The authorization and runtime information is initialized as soon\n // as it is available. This allows logs and spans to be buffered before\n // the library is initialized, which can be helpul in a complex setup with\n // many subsystems.\n //\n _initReportingDataIfNeeded(modified) {\n // Ignore redundant initialization; complaint on inconsistencies\n if (this._auth !== null) {\n if (!this._runtime) {\n return this._error('Inconsistent state: auth initialized without runtime.');\n }\n if (modified.access_token) {\n throw new Error('Cannot change access_token after it has been set.');\n }\n if (modified.component_name) {\n throw new Error('Cannot change component_name after it has been set.');\n }\n if (modified.collector_host) {\n throw new Error('Cannot change collector_host after the connection is established');\n }\n if (modified.collector_port) {\n throw new Error('Cannot change collector_port after the connection is established');\n }\n if (modified.collector_path) {\n throw new Error('Cannot change collector_path after the connection is established');\n }\n if (modified.collector_encryption) {\n throw new Error('Cannot change collector_encryption after the connection is established');\n }\n return;\n }\n\n // See if the Thrift data can be initialized\n if (this._options.access_token.length > 0 && this._options.component_name.length > 0) {\n this._runtimeGUID = this._platform.runtimeGUID(this._options.component_name);\n\n this._auth = new AuthImp(this._options.access_token);\n\n //\n // Assemble the tracer tags from the user-specified and automatic,\n // internal tags.\n //\n let tags = {};\n _each(this._options.tags, (value, key) => {\n if (typeof value !== 'string') {\n this._error(`Tracer tag value is not a string: key=${key}`);\n return;\n }\n tags[key] = value;\n });\n tags['lightstep.tracer_version'] = packageObject.version;\n let platformTags = this._platform.tracerTags();\n _each(platformTags, (val, key) => {\n tags[key] = val;\n });\n\n this._runtime = new RuntimeImp(this._runtimeGUID, this._startMicros, this._options.component_name, tags);\n\n this._info('Initializing thrift reporting data', {\n component_name : this._options.component_name,\n access_token : this._auth.getAccessToken(),\n });\n this.emit('reporting_initialized');\n }\n }\n\n getLogFieldKeyHardLimit() {\n return this._options.log_field_key_hard_limit;\n }\n\n getLogFieldValueHardLimit() {\n return this._options.log_field_value_hard_limit;\n }\n\n //-----------------------------------------------------------------------//\n // Plugins\n //-----------------------------------------------------------------------//\n\n addPlatformPlugins(opts) {\n let pluginSet = this._platform.plugins(opts);\n _each(pluginSet, (val) => {\n this.addPlugin(val);\n });\n }\n\n addPlugin(plugin) {\n // Don't add plug-ins twice\n let name = plugin.name();\n if (this._plugins[name]) {\n return;\n }\n\n this._plugins[name] = plugin;\n plugin.addOptions(this);\n }\n\n startPlugins() {\n _each(this._plugins, (val, key) => {\n this._plugins[key].start(this);\n });\n }\n\n //-----------------------------------------------------------------------//\n // Spans\n //-----------------------------------------------------------------------//\n\n // This is a LightStep-specific feature that should be used sparingly. It\n // sets a \"global\" root span such that spans that would *otherwise* be root\n // span instead inherit the trace GUID of the active root span. This is\n // best clarified by example:\n //\n // On document load in the browser, an \"active root span\" is created for\n // the page load process. Any spans started without an explicit parent\n // will the document load trace GUID instead of starting a trace GUID.\n // This implicit root remains active only until the page is done loading.\n //\n // Any span adding itself as a root span *must* remove itself along with\n // calling finish(). This will *not* be done automatically.\n //\n // NOTE: currently, only the trace GUID is transferred; it may or may not\n // make sure to make this a proper parent.\n //\n // NOTE: the root span tracking is handled as a set rather than a single\n // global to avoid conflicts between libraries.\n addActiveRootSpan(span) {\n this._activeRootSpanSet[span._guid] = span;\n this._setActiveRootSpanToYoungest();\n }\n\n removeActiveRootSpan(span) {\n delete this._activeRootSpanSet[span._guid];\n this._setActiveRootSpanToYoungest();\n }\n\n _setActiveRootSpanToYoungest() {\n // Set the _activeRootSpan to the youngest of the roots in case of\n // multiple.\n this._activeRootSpan = null;\n _each(this._activeRootSpanSet, (span) => {\n if (!this._activeRootSpan ||\n span._beginMicros > this._activeRootSpan._beginMicros) {\n this._activeRootSpan = span;\n }\n });\n }\n\n //-----------------------------------------------------------------------//\n // Encoding / decoding\n //-----------------------------------------------------------------------//\n\n _objectToUint8Array(obj) {\n let jsonString;\n try {\n // encodeURIComponent() is a *very* inefficient, but simple and\n // well-supported way to avoid having to think about Unicode in\n // in the conversion to a UInt8Array.\n //\n // Writing multiple bytes for String.charCodeAt and\n // String.codePointAt would be an alternate approach; again,\n // simplicitly is being preferred over efficiency for the moment.\n jsonString = encodeURIComponent(JSON.stringify(obj));\n } catch (e) {\n this._error('Could not binary encode carrier data.');\n return null;\n }\n\n let buffer = new ArrayBuffer(jsonString.length);\n let view = new Uint8Array(buffer);\n for (let i = 0; i < jsonString.length; i++) {\n let code = jsonString.charCodeAt(i);\n if (!(code >= 0 && code <= 255)) {\n this._error('Unexpected character code');\n return null;\n }\n view[i] = code;\n }\n return view;\n }\n\n _uint8ArrayToObject(arr) {\n if (!arr) {\n this._error('Array is null');\n return null;\n }\n\n let jsonString = '';\n for (let i = 0; i < arr.length; i++) {\n jsonString += String.fromCharCode(arr[i]);\n }\n try {\n return JSON.parse(decodeURIComponent(jsonString));\n } catch (e) {\n this._error('Could not decode binary data.');\n return null;\n }\n }\n\n //-----------------------------------------------------------------------//\n // Logging\n //-----------------------------------------------------------------------//\n\n log() {\n let b = new LogBuilder(this);\n return b;\n }\n\n //-----------------------------------------------------------------------//\n // Buffers\n //-----------------------------------------------------------------------//\n\n _clearBuffers() {\n this._spanRecords = [];\n this._internalLogs = [];\n\n // Create a new object to avoid overwriting the values in any references\n // to the old object\n let counters = {};\n _each(this._counters, (unused, key) => {\n counters[key] = 0;\n });\n this._counters = counters;\n }\n\n _buffersAreEmpty() {\n if (this._spanRecords.length > 0) {\n return false;\n }\n if (this._internalLogs.length > 0) {\n return false;\n }\n\n let countersAllZero = true;\n _each(this._counters, (val) => {\n if (val > 0) {\n countersAllZero = false;\n }\n });\n return countersAllZero;\n }\n\n _addSpanRecord(record) {\n this._internalAddSpanRecord(record);\n this.emit('span_added', record);\n }\n\n _internalAddSpanRecord(record) {\n if (!record) {\n this._error('Attempt to add null record to buffer');\n return;\n }\n\n if (this._spanRecords.length >= this._options.max_span_records) {\n let index = Math.floor(this._spanRecords.length * Math.random());\n this._spanRecords[index] = record;\n this._counters['spans.dropped']++;\n } else {\n this._spanRecords.push(record);\n }\n }\n\n _restoreRecords(spans, internalLogs, counters) {\n _each(spans, (span) => {\n this._internalAddSpanRecord(span);\n });\n\n let currentInternalLogs = this._internalLogs;\n this._internalLogs = [];\n let toAdd = internalLogs.concat(currentInternalLogs);\n _each(toAdd, (log) => {\n this._pushInternalLog(log);\n });\n\n _each(counters, (value, key) => {\n if (key in this._counters) {\n this._counters[key] += value;\n } else {\n this._error(`Bad counter name: ${key}`);\n }\n });\n }\n\n //-----------------------------------------------------------------------//\n // Reporting loop\n //-----------------------------------------------------------------------//\n\n _setupReportOnExit() {\n if (this._options.disable_report_on_exit) {\n this._debug('report-on-exit is disabled.');\n return;\n }\n\n // Do a final explicit flush. Note that the final flush may enqueue\n // asynchronous callbacks that cause the 'beforeExit' event to be\n // re-emitted when those callbacks finish.\n let finalFlushOnce = 0;\n let finalFlush = () => {\n if (finalFlushOnce++ > 0) { return; }\n this._info('Final flush before exit.');\n this._flushReport(false, true, (err) => {\n if (err) {\n this._warn('Final report before exit failed', {\n error : err,\n unflushed_spans : this._spanRecords.length,\n buffer_youngest_micros : this._reportYoungestMicros,\n });\n }\n });\n };\n this._platform.onBeforeExit(finalFlush);\n }\n\n _startReportingLoop() {\n if (this._options.disabled) {\n this._info('Not starting reporting loop: instrumentation is disabled.');\n return;\n }\n if (this._options.disable_reporting_loop) {\n this._info('Not starting reporting loop: reporting loop is disabled.');\n return;\n }\n if (this._auth === null) {\n // Don't start the loop until the thrift data necessary to do the\n // report is set up.\n return;\n }\n if (this._reportingLoopActive) {\n this._info('Reporting loop already started!');\n return;\n }\n\n this._info('Starting reporting loop:', this._runtime);\n this._reportingLoopActive = true;\n\n // Stop the reporting loop so the Node.js process does not become a\n // zombie waiting for the timers.\n let stopReportingOnce = 0;\n let stopReporting = () => {\n if (stopReportingOnce++ > 0) { return; }\n this._stopReportingLoop();\n };\n this._platform.onBeforeExit(stopReporting);\n\n // Begin the asynchronous reporting loop\n let loop = () => {\n this._enqueueNextReport((err) => {\n if (this._reportingLoopActive) {\n loop();\n }\n });\n };\n\n const delay = Math.floor(Math.random() * this._options.delay_initial_report_millis);\n util.detachedTimeout(() => {\n loop();\n }, delay);\n }\n\n _stopReportingLoop() {\n this._debug('Stopping reporting loop');\n\n this._reportingLoopActive = false;\n clearTimeout(this._reportTimer);\n this._reportTimer = null;\n }\n\n _enqueueNextReport(done) {\n // If there's already a report request enqueued, ignore this new\n // request.\n if (this._reportTimer) {\n return;\n }\n\n // If the clock state is still being primed, potentially use the\n // shorted report interval.\n //\n // However, do not use the shorter interval in the case of an error.\n // That does not provide sufficient backoff.\n let reportInterval = this._options.max_reporting_interval_millis;\n if (this._reportErrorStreak === 0 &&\n this._useClockState &&\n !this._clockState.isReady()) {\n reportInterval = Math.min(constants.CLOCK_STATE_REFRESH_INTERVAL_MS, reportInterval);\n }\n\n // After 3 consecutive errors, expand the retry delay up to 8x the\n // normal interval, jitter the delay by +/- 25%, and be sure to back off\n // *at least* the standard reporting interval in the case of an error.\n let backOff = 1 + Math.min(7, Math.max(0, this._reportErrorStreak));\n let basis = backOff * reportInterval;\n let jitter = 1.0 + (Math.random() * 0.5 - 0.25);\n let delay = Math.floor(Math.max(0, jitter * basis));\n\n this._debug(`Delaying next flush for ${delay}ms`);\n this._reportTimer = util.detachedTimeout(() => {\n this._reportTimer = null;\n this._flushReport(false, false, done);\n }, delay);\n }\n\n /**\n * Internal worker for a flush of buffered data into a report.\n *\n * @param {bool} manual - this is a manually invoked flush request. Don't\n * override this call with a clock state syncing flush, for example.\n * @param {bool} detached - this is an \"at exit\" flush that should not block\n * the calling process in any manner. This is specifically called\n * \"detached\" due to the browser use case where the report is done,\n * not just asynchronously, but as a script request that continues\n * to run even if the page is navigated away from mid-request.\n * @param {function} done - standard callback function called on success\n * or error.\n */\n _flushReport(manual, detached, done) {\n done = done || function (err) {};\n\n let clockReady = this._clockState.isReady();\n let clockOffsetMicros = this._clockState.offsetMicros();\n\n // Diagnostic information on the clock correction\n this._debug('time correction state', {\n offset_micros : clockOffsetMicros,\n active_samples : this._clockState.activeSampleCount(),\n ready : clockReady,\n });\n\n let spanRecords = this._spanRecords;\n let counters = this._counters;\n let internalLogs = this._internalLogs;\n\n // If the clock is not ready, do an \"empty\" flush to build more clock\n // samples before the real data is reported.\n // A detached flush (i.e. one intended to fire at exit or other \"last\n // ditch effort\" event) should always use the real data.\n if (this._useClockState && !manual && !clockReady && !detached) {\n this._debug('Flushing empty report to prime clock state');\n spanRecords = [];\n counters = {};\n internalLogs = [];\n } else {\n // Early out if we can.\n if (this._buffersAreEmpty()) {\n this._debug('Skipping empty report');\n return done(null);\n }\n\n // Clear the object buffers as the data is now in the local\n // variables\n this._clearBuffers();\n this._debug(`Flushing report (${spanRecords.length} spans)`);\n }\n\n this._transport.ensureConnection(this._options);\n\n // Ensure the runtime GUID is set as it is possible buffer logs and\n // spans before the GUID is necessarily set.\n console.assert(this._runtimeGUID !== null, 'No runtime GUID for Tracer'); // eslint-disable-line no-console\n\n let timestampOffset = this._useClockState ? clockOffsetMicros : 0;\n let now = this._platform.nowMicros();\n let report = new ReportImp(this._runtime, this._reportYoungestMicros, now,\n spanRecords, internalLogs, counters, timestampOffset);\n\n this.emit('prereport', report);\n let originMicros = this._platform.nowMicros();\n\n this._transport.report(detached, this._auth, report, (err, res) => {\n let destinationMicros = this._platform.nowMicros();\n let reportWindowSeconds = (now - report.oldest_micros) / 1e6;\n\n if (err) {\n // How many errors in a row? Influences the report backoff.\n this._reportErrorStreak++;\n\n // On a failed report, re-enqueue the data that was going to be\n // sent.\n let errString;\n if (err.message) {\n errString = `${err.message}`;\n } else {\n errString = `${err}`;\n }\n this._warn(`Error in report: ${errString}`, {\n last_report_seconds_ago : reportWindowSeconds,\n });\n\n this._restoreRecords(\n report.getSpanRecords(),\n report.getInternalLogs(),\n report.getCounters());\n\n // Increment the counter *after* the counters are restored\n this._counters['reports.errors.send']++;\n\n this.emit('report_error', err, {\n error : err,\n streak : this._reportErrorStreak,\n detached : detached,\n });\n } else {\n if (this.verbosity() >= 4) {\n this._debug(`Report flushed for last ${reportWindowSeconds} seconds`, {\n spans_reported : report.getSpanRecords().length,\n });\n }\n\n // Update internal data after the successful report\n this._reportErrorStreak = 0;\n this._reportYoungestMicros = now;\n\n // Update the clock state if there's info from the report\n if (res) {\n if (res.timing && res.timing.receive_micros && res.timing.transmit_micros) {\n this._clockState.addSample(\n originMicros,\n res.timing.receive_micros,\n res.timing.transmit_micros,\n destinationMicros);\n } else {\n // The response does not have timing information. Disable\n // the clock state assuming there'll never be timing data\n // to use.\n this._useClockState = false;\n }\n\n if (res.errors && res.errors.length > 0) {\n this._warn('Errors in report', res.errors);\n }\n } else {\n this._useClockState = false;\n }\n\n this.emit('report', report, res);\n }\n return done(err);\n });\n }\n\n //-----------------------------------------------------------------------//\n // Stats and metrics\n //-----------------------------------------------------------------------//\n\n /**\n * Internal API that returns some internal metrics.\n */\n stats() {\n return {\n counters : this._counters,\n };\n }\n\n //-----------------------------------------------------------------------//\n // Internal logging & errors\n //-----------------------------------------------------------------------//\n // The rules for how internal logs are processed:\n //\n // * Internal logs that are included in the Collector report:\n // - Always send errors logs along with the reports\n // - Never include any other logs\n // * Internal logs that are echoed to the host application:\n // - See the README.md :)\n //\n _debug(msg, payload) {\n if (this.verbosity() < 4) {\n return;\n }\n this._printToConsole('log', `[LightStep:DEBUG] ${msg}`, payload);\n }\n\n _info(msg, payload) {\n if (this.verbosity() < 3) {\n return;\n }\n this._printToConsole('log', `[LightStep:INFO] ${msg}`, payload);\n }\n\n _warn(msg, payload) {\n this._counters['internal.warnings']++;\n\n if (this.verbosity() < 3) {\n return;\n }\n this._printToConsole('warn', `[LightStep:WARN] ${msg}`, payload);\n }\n\n _error(msg, payload) {\n this._counters['internal.errors']++;\n\n // Internal errors are always reported to the collector\n let record = this.log()\n .level(constants.LOG_ERROR)\n .message(msg)\n .payload(payload)\n .record();\n this._pushInternalLog(record);\n\n // Internal errors are reported to the host console conditionally based\n // on the verbosity level.\n let verbosity = this.verbosity();\n if (verbosity === 0) {\n return;\n }\n\n // Error messages are throttled in verbosity === 1 mode\n const now = Date.now();\n if (verbosity === 1) {\n const nextVisible = this._lastVisibleErrorMillis + this._options.error_throttle_millis;\n if (now < nextVisible) {\n this._skippedVisibleErrors++;\n return;\n }\n if (this._skippedVisibleErrors > 0) {\n /* eslint-disable max-len */\n const s = `${this._skippedVisibleErrors} errors masked since last logged error. Increase 'verbosity' option to see all errors.`;\n /* eslint-enable max-len */\n this._printToConsole('error', `[LightStep:ERROR] ${s}`, payload);\n }\n }\n\n this._printToConsole('error', `[LightStep:ERROR] ${msg}`, payload);\n this._lastVisibleErrorMillis = now;\n this._skippedVisibleErrors = 0;\n }\n\n _printToConsole(type, msg, payload) {\n // Internal option to silence intentional errors generated by the unit\n // tests.\n if (this._options.silent) {\n return;\n }\n\n if (payload !== undefined) {\n console[type](msg, payload); // eslint-disable-line no-console\n } else {\n console[type](msg); // eslint-disable-line no-console\n }\n }\n\n _pushInternalLog(record) {\n if (!record) {\n return;\n }\n if (this._internalLogs.length >= MAX_INTERNAL_LOGS) {\n record.message = `MAX_INTERNAL_LOGS limit hit. Last error: ${record.message}`;\n this._internalLogs[this._internalLogs.length - 1] = record;\n } else {\n this._internalLogs.push(record);\n }\n }\n}\n","import _each from '../../_each';\n\n// How many updates before a sample is considered old. This happens to\n// be one less than the number of samples in our buffer but that's\n// somewhat arbitrary.\nconst kMaxOffsetAge = 7;\n\nconst kStoredSamplesTTLMicros = 60 * 60 * 1000 * 1000; // 1 hour\n\nclass ClockState {\n\n constructor(opts) {\n this._nowMicros = opts.nowMicros;\n this._localStoreGet = opts.localStoreGet;\n this._localStoreSet = opts.localStoreSet;\n\n // The last eight samples, computed from timing information in\n // RPCs.\n this._samples = [];\n this._currentOffsetMicros = 0;\n\n // How many updates since we've updated currentOffsetMicros.\n this._currentOffsetAge = kMaxOffsetAge + 1;\n\n // Try to load samples from the local store.\n // Only use the data if it's recent.\n let storedData = this._localStoreGet();\n if (storedData &&\n storedData.timestamp_micros &&\n storedData.timestamp_micros > this._nowMicros() - kStoredSamplesTTLMicros) {\n // Make sure there are no more than (kMaxOffsetAge+1) elements\n this._samples = storedData.samples.slice(-(kMaxOffsetAge + 1));\n }\n // Update the current offset based on these data.\n this.update();\n }\n\n // Add a new timing sample and update the offset.\n addSample(originMicros,\n receiveMicros,\n transmitMicros,\n destinationMicros\n ) {\n let latestDelayMicros = Number.MAX_VALUE;\n let latestOffsetMicros = 0;\n // Ensure that all of the data are valid before using them. If\n // not, we'll push a {0, MAX} record into the queue.\n if (originMicros > 0 && receiveMicros > 0 &&\n transmitMicros > 0 && destinationMicros > 0) {\n latestDelayMicros = (destinationMicros - originMicros) -\n (transmitMicros - receiveMicros);\n latestOffsetMicros = ((receiveMicros - originMicros) +\n (transmitMicros - destinationMicros)) / 2;\n }\n\n // Discard the oldest sample and push the new one.\n if (this._samples.length === kMaxOffsetAge + 1) {\n this._samples.shift();\n }\n this._samples.push({\n delayMicros : latestDelayMicros,\n offsetMicros : latestOffsetMicros,\n });\n this._currentOffsetAge++;\n\n // Update the local store with this new sample.\n this._localStoreSet({\n timestamp_micros : this._nowMicros(),\n samples : this._samples,\n });\n this.update();\n }\n\n // Update the time offset based on the current samples.\n update() {\n // This is simplified version of the clock filtering in Simple\n // NTP. It ignores precision and dispersion (frequency error). In\n // brief, it keeps the 8 (kMaxOffsetAge+1) most recent\n // delay-offset pairs, and considers the offset with the smallest\n // delay to be the best one. However, it only uses this new offset\n // if the change (relative to the last offset) is small compared\n // to the estimated error.\n //\n // See:\n // https://tools.ietf.org/html/rfc5905#appendix-A.5.2\n // http://books.google.com/books?id=pdTcJBfnbq8C\n // esp. section 3.5\n // http://www.eecis.udel.edu/~mills/ntp/html/filter.html\n // http://www.eecis.udel.edu/~mills/database/brief/algor/algor.pdf\n // http://www.eecis.udel.edu/~mills/ntp/html/stats.html\n\n // TODO: Consider huff-n'-puff if the delays are highly asymmetric.\n // http://www.eecis.udel.edu/~mills/ntp/html/huffpuff.html\n\n // Find the sample with the smallest delay; the corresponding\n // offset is the \"best\" one.\n let minDelayMicros = Number.MAX_VALUE;\n let bestOffsetMicros = 0;\n _each(this._samples, (sample) => {\n if (sample.delayMicros < minDelayMicros) {\n minDelayMicros = sample.delayMicros;\n bestOffsetMicros = sample.offsetMicros;\n }\n });\n\n // No update.\n if (bestOffsetMicros === this._currentOffsetMicros) {\n return;\n }\n\n // Now compute the jitter, i.e. the error relative to the new\n // offset were we to use it.\n let jitter = 0;\n _each(this._samples, (sample) => {\n jitter += Math.pow(bestOffsetMicros - sample.offsetMicros, 2);\n });\n jitter = Math.sqrt(jitter / this._samples.length);\n\n // Ignore spikes: only use the new offset if the change is not too\n // large... unless the current offset is too old. The \"too old\"\n // condition is also triggered when update() is called from the\n // constructor.\n const kSGATE = 3; // See RFC 5905\n if (this._currentOffsetAge > kMaxOffsetAge ||\n Math.abs(this._currentOffsetMicros - bestOffsetMicros) < kSGATE * jitter) {\n this._currentOffsetMicros = bestOffsetMicros;\n this._currentOffsetAge = 0;\n }\n }\n\n // Returns the difference in microseconds between the server's clock\n // and our clock. This should be added to any local timestamps before\n // sending them to the server. Note that a negative offset means that\n // the local clock is ahead of the server's.\n offsetMicros() {\n return Math.floor(this._currentOffsetMicros);\n }\n\n // Returns true if we've performed enough measurements to be confident\n // in the current offset.\n isReady() {\n return this._samples.length > 3;\n }\n\n activeSampleCount() {\n return this._samples.length;\n }\n}\n\nmodule.exports = ClockState;\n","class Util {\n\n // Similar to a regular setTimeout() call, but dereferences the timer so the\n // program execution will not be held up by this timer.\n detachedTimeout(callback, delay) {\n let timer = setTimeout(callback, delay);\n if (timer.unref) {\n timer.unref();\n }\n return timer;\n }\n}\n\nexport default new Util();\n","import Tracer from './imp/tracer_imp';\nimport { Platform } from './platform_abstraction_layer';\n\nconst library = {\n Tracer : Tracer,\n};\n\nPlatform.initLibrary(library);\nmodule.exports = library;\n","/* global PLATFORM_BROWSER */\n\n// Hide the differences in how the Thrift compiler generates code for the\n// different platforms as well as expose a Platform class to abstract a few\n// general differences in the platforms.\nif ((typeof PLATFORM_BROWSER !== 'undefined') && PLATFORM_BROWSER) {\n module.exports = {\n Platform : require('./imp/platform/browser/platform_browser.js'),\n ThriftTransport : require('./imp/platform/browser/transport_httpthrift.js'),\n ProtoTransport : require('./imp/platform/browser/transport_httpproto.js'),\n thrift : require('./imp/platform/browser/thrift.js'),\n crouton_thrift : require('./imp/platform/browser/crouton_thrift.js'),\n proto : require('./imp/generated_proto').lightstep,\n };\n} else {\n module.exports = {\n Platform : require('./imp/platform/node/platform_node.js'),\n ThriftTransport : require('./imp/platform/node/transport_httpthrift.js'),\n ProtoTransport : require('./imp/platform/node/transport_httpproto.js'),\n thrift : require('thrift'),\n crouton_thrift : require('./imp/platform/node/crouton_thrift.js'),\n proto : require('./imp/generated_proto').lightstep,\n };\n}\n","import _each from '../_each';\n\nclass InstrumentPageLoad {\n constructor() {\n this._inited = false;\n this._span = null;\n }\n\n name() {\n return 'instrument_page_load';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('instrument_page_load', { type : 'bool', defaultValue : false });\n }\n\n start(tracerImp) {\n if (this._inited) {\n return;\n }\n this._inited = true;\n\n if (typeof window !== 'object' || typeof document !== 'object') {\n return;\n }\n\n const currentOptions = tracerImp.options();\n if (currentOptions.instrument_page_load) {\n this._ensureSpanStarted(tracerImp);\n document.addEventListener('readystatechange', this._handleReadyStateChange.bind(this));\n }\n }\n\n stop() {\n }\n\n _ensureSpanStarted(tracerImp) {\n if (!this._span) {\n this._span = tracerImp.startSpan('document/load');\n tracerImp.addActiveRootSpan(this._span);\n }\n }\n\n _handleReadyStateChange() {\n if (!this._span) {\n return;\n }\n\n let span = this._span;\n let state = document.readyState;\n let payload = undefined;\n if (state === 'complete') {\n payload = {};\n if (window.performance && performance.timing) {\n this._addTimingSpans(span, performance.timing);\n payload['window.performance.timing'] = performance.timing;\n }\n }\n\n span.logEvent(`document.readystatechange ${state}`, payload);\n\n if (state === 'complete') {\n if (span.tracer()) {\n span.tracer().removeActiveRootSpan(span.tracer());\n }\n span.finish();\n }\n }\n\n _copyNavigatorProperties(nav) {\n let dst = {};\n for (let key in nav) { // eslint-disable-line guard-for-in\n try {\n let value = nav[key];\n switch (key) {\n\n case 'plugins': {\n let p = [];\n for (let i = 0; i < value.length; i++) {\n let item = value.item(i);\n p.push({\n name : item.name,\n description : item.description,\n });\n }\n dst[key] = p;\n } break;\n\n case 'mimeTypes': {\n let p = [];\n for (let i = 0; i < value.length; i++) {\n let item = value.item(i);\n p.push({\n type : item.type,\n description : item.description,\n suffixes : item.suffixes,\n });\n }\n dst[key] = p;\n } break;\n\n default:\n dst[key] = value;\n break;\n }\n } catch (e) {\n // Skip, just in case\n }\n }\n return dst;\n }\n\n // Retroactively create the appropriate spans and logs\n _addTimingSpans(parentImp, timing) {\n // NOTE: this currently relies on LightStep-specific APIs\n if (!parentImp) {\n return;\n }\n\n parentImp.setTag('user_agent', navigator.userAgent);\n\n _each(timing, (value, key) => {\n // e.g. secureConnectionStart is not always set\n if (typeof value !== 'number' || value === 0) {\n return;\n }\n\n let payload = undefined;\n\n if (key === 'navigationStart' && typeof navigator === 'object') {\n payload = {\n navigator : this._copyNavigatorProperties(navigator),\n };\n }\n parentImp.log({\n message : `document ${key}`,\n payload : payload,\n }, value);\n });\n\n if (window.chrome && window.chrome.loadTimes) {\n let chromeTimes = window.chrome.loadTimes();\n if (chromeTimes) {\n parentImp.log({\n message : 'window.chrome.loadTimes()',\n payload : chromeTimes,\n }, timing.domComplete);\n }\n }\n\n parentImp.setBeginMicros(timing.navigationStart * 1000.0);\n\n parentImp.tracer().startSpan('document/time_to_first_byte', { childOf : parentImp })\n .setBeginMicros(timing.requestStart * 1000.0)\n .setEndMicros(timing.responseStart * 1000.0)\n .finish();\n parentImp.tracer()\n .startSpan('document/response_transfer', { childOf : parentImp })\n .setBeginMicros(timing.responseStart * 1000.0)\n .setEndMicros(timing.responseEnd * 1000.0)\n .finish();\n parentImp.tracer().startSpan('document/dom_load', { childOf : parentImp })\n .setBeginMicros(timing.domLoading * 1000.0)\n .setEndMicros(timing.domInteractive * 1000.0)\n .finish();\n }\n}\n\nmodule.exports = new InstrumentPageLoad();\n","import _each from '../_each';\nimport * as opentracing from 'opentracing';\n\n// Capture the proxied values on script load (i.e. ASAP) in case there are\n// multiple layers of instrumentation.\nlet proxied = {};\nif (typeof window === 'object' && typeof window.XMLHttpRequest !== 'undefined') {\n proxied = {\n XMLHttpRequest : XMLHttpRequest,\n open : XMLHttpRequest.prototype.open,\n send : XMLHttpRequest.prototype.send,\n setRequestHeader : XMLHttpRequest.prototype.setRequestHeader,\n };\n}\n\nfunction getCookies() {\n if (typeof document === 'undefined' || !document.cookie) {\n return null;\n }\n let cookies = document.cookie.split(';');\n let data = {};\n let count = 0;\n for (let i = 0; i < cookies.length; i++) {\n let parts = cookies[i].split('=', 2);\n if (parts.length === 2) {\n let key = parts[0].replace(/^\\s+/, '').replace(/\\s+$/, '');\n data[key] = decodeURIComponent(parts[1]);\n try {\n data[key] = JSON.parse(data[key]);\n } catch (_ignored) { /* Ignored */ }\n count++;\n }\n }\n if (count > 0) {\n return data;\n }\n return null;\n}\n\n// Normalize the getAllResponseHeaders output\nfunction getResponseHeaders(xhr) {\n let raw = xhr.getAllResponseHeaders();\n let parts = raw.replace(/\\s+$/, '').split(/\\n/);\n for (let i = 0; i < parts.length; i++) {\n parts[i] = parts[i].replace(/\\r/g, '').replace(/^\\s+/, '').replace(/\\s+$/, '');\n }\n return parts;\n}\n\n// Automatically create spans for all XMLHttpRequest objects.\n//\n// NOTE: this code currently works only with a single Tracer.\n//\nclass InstrumentXHR {\n constructor() {\n this._enabled = this._isValidContext();\n this._proxyInited = false;\n this._internalExclusions = [];\n this._tracer = null;\n this._handleOptions = this._handleOptions.bind(this);\n\n if (!this._enabled) {\n return;\n }\n }\n\n name() {\n return 'instrument_xhr';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('xhr_instrumentation', { type : 'bool', defaultValue : false });\n tracerImp.addOption('xhr_url_inclusion_patterns', { type : 'array', defaultValue : [/.*/] });\n tracerImp.addOption('xhr_url_exclusion_patterns', { type : 'array', defaultValue : [] });\n }\n\n start(tracerImp) {\n if (!this._enabled) {\n return;\n }\n this._tracer = tracerImp;\n\n let currentOptions = tracerImp.options();\n this._addServiceHostToExclusions(currentOptions);\n this._handleOptions({}, currentOptions);\n tracerImp.on('options', this._handleOptions);\n }\n\n stop() {\n if (!this._enabled) {\n return;\n }\n let proto = proxied.XMLHttpRequest.prototype;\n proto.open = proxied.open;\n proto.send = proxied.send;\n }\n\n /**\n * Respond to options changes on the Tracer.\n *\n * Note that `modified` is the options that have changed in this call,\n * along with their previous and new values. `current` is the full set of\n * current options *including* the newly modified values.\n */\n _handleOptions(modified, current) {\n // Automatically add the service host itself to the list of exclusions\n // to avoid reporting on the reports themselves\n let serviceHost = modified.collector_host;\n if (serviceHost) {\n this._addServiceHostToExclusions(current);\n }\n\n // Set up the proxied XHR calls unless disabled\n if (!this._proxyInited && current.xhr_instrumentation) {\n this._proxyInited = true;\n let proto = proxied.XMLHttpRequest.prototype;\n proto.setRequestHeader = this._instrumentSetRequestHeader();\n proto.open = this._instrumentOpen();\n proto.send = this._instrumentSend();\n }\n }\n\n /**\n * Ensure that the reports to the collector don't get instrumented as well,\n * as that recursive instrumentation is more confusing than valuable!\n */\n _addServiceHostToExclusions(opts) {\n if (opts.collector_host.length === 0) {\n return;\n }\n\n // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\n function escapeRegExp(str) {\n return (`${str}`).replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n }\n\n // Check against the hostname without the port as well as the canonicalized\n // URL may drop the standard port.\n let host = escapeRegExp(opts.collector_host);\n let port = escapeRegExp(opts.collector_port);\n let set = [new RegExp(`^https?://${host}:${port}`)];\n if (port === '80') {\n set.push(new RegExp(`^http://${host}`));\n } else if (port === '443') {\n set.push(new RegExp(`^https://${host}`));\n }\n this._internalExclusions = set;\n }\n\n /**\n * Check preconditions for the auto-instrumentation of XHRs to work properly.\n * There are a lot of potential JavaScript platforms.\n */\n _isValidContext() {\n if (typeof window === 'undefined') {\n return false;\n }\n if (!window.XMLHttpRequest) {\n return false;\n }\n if (!window.XMLHttpRequest.prototype) {\n return false;\n }\n return true;\n }\n\n _instrumentSetRequestHeader() {\n return function (header, value) {\n this.__requestHeaders = this.__requestHeaders || {};\n this.__requestHeaders[header] = value;\n return proxied.setRequestHeader.apply(this, arguments);\n };\n }\n\n _instrumentOpen() {\n let self = this;\n let tracer = this._tracer;\n\n return function (method, url, asyncArg, user, password) {\n if (!self._shouldTrace(tracer, this, url)) {\n return proxied.open.apply(this, arguments);\n }\n\n let span = tracer.startSpan('XMLHttpRequest');\n tracer.addActiveRootSpan(span);\n this.__tracer_span = span;\n this.__tracer_url = url;\n\n let tags = {\n method : method,\n url : url,\n async : asyncArg,\n user : user,\n };\n if (url) {\n tags.url_pathname = url.split('?')[0];\n }\n\n let openPayload = {};\n _each(tags, (val, key) => {\n openPayload[key] = val;\n });\n openPayload.cookies = getCookies();\n\n // Note: async defaults to true\n let async = (asyncArg === undefined ? true : asyncArg);\n if (async) {\n this.addEventListener('readystatechange', function () {\n if (this.readyState === 0) {\n span.log({\n readyState : 0,\n event : 'unsent',\n });\n } else if (this.readyState === 1) {\n span.log({\n readyState : 1,\n event : 'sending',\n });\n } else if (this.readyState === 2) {\n span.log({\n readyState : 2,\n event : 'headers received',\n method : method,\n url : url,\n openPayload : openPayload,\n headers : getResponseHeaders(this),\n });\n span.addTags(tags);\n } else if (this.readyState === 3) {\n span.log({\n readyState : 3,\n event : 'loading',\n });\n } else if (this.readyState === 4) {\n let responseType = this.responseType;\n span.log({\n readyState : 4,\n url : url,\n method : method,\n headers : getResponseHeaders(this),\n status : this.status,\n statusText : this.statusText,\n responseType : responseType,\n });\n tracer.removeActiveRootSpan(span);\n span.finish();\n } else {\n span.log({\n readyState : this.readyState,\n });\n }\n });\n }\n\n let result = proxied.open.apply(this, arguments);\n if (!async) {\n tracer.removeActiveRootSpan(span);\n span.finish();\n }\n return result;\n };\n }\n\n _instrumentSend() {\n let self = this;\n let tracer = this._tracer;\n return function () {\n if (!self._shouldTrace(tracer, this, this.__tracer_url)) {\n return proxied.send.apply(this, arguments);\n }\n\n let span = this.__tracer_span;\n if (!span) {\n return proxied.send.apply(this, arguments);\n }\n\n let data = Array.prototype.slice.call(arguments);\n let len = undefined;\n if (data.length === 1) {\n if (data[0] && data[0].length) {\n len = data[0].length;\n }\n try {\n data = JSON.parse(data[0]);\n } catch (e) {\n // Ignore the error\n }\n }\n let lenStr = (len === undefined) ? '' : `, data length=${len}`;\n span.log({\n event : 'send',\n data_length : lenStr,\n });\n\n // Add Open-Tracing headers\n const headersCarrier = {};\n tracer.inject(span.context(), opentracing.FORMAT_HTTP_HEADERS, headersCarrier);\n const keys = Object.keys(headersCarrier);\n keys.forEach((key) => {\n proxied.setRequestHeader.call(this, key, headersCarrier[key]);\n });\n\n return proxied.send.apply(this, arguments);\n };\n }\n\n _shouldTrace(tracer, xhr, url) {\n // This shouldn't be possible, but let's be paranoid\n if (!tracer) {\n return false;\n }\n\n let opts = tracer.options();\n if (opts.disabled) {\n return false;\n }\n if (!url) {\n return false;\n }\n for (let key in this._internalExclusions) {\n if (!this._internalExclusions.hasOwnProperty(key)) {\n continue;\n }\n const ex = this._internalExclusions[key];\n if (ex.test(url)) {\n return false;\n }\n }\n let include = false;\n for (let key in opts.xhr_url_inclusion_patterns) {\n if (!opts.xhr_url_inclusion_patterns.hasOwnProperty(key)) {\n continue;\n }\n const inc = opts.xhr_url_inclusion_patterns[key];\n if (inc.test(url)) {\n include = true;\n break;\n }\n }\n if (!include) {\n return false;\n }\n for (let key in opts.xhr_url_exclusion_patterns) {\n if (!opts.xhr_url_exclusion_patterns.hasOwnProperty(key)) {\n continue;\n }\n const ex = opts.xhr_url_exclusion_patterns[key];\n if (ex.test(url)) {\n return false;\n }\n }\n return true;\n }\n}\n\nmodule.exports = new InstrumentXHR();\n","const constants = require('../constants');\n\nclass LogToConsole {\n constructor() {\n this._enabled = false;\n this._tracer = null;\n this._optionsCb = this._handleOptions.bind(this);\n this._logAddedCb = this._handleLogAdded.bind(this);\n }\n\n name() {\n return 'log_to_console';\n }\n\n addOptions(tracerImp) {\n tracerImp.addOption('log_to_console', {\n type : 'bool',\n defaultValue : false,\n });\n tracerImp.on('options', this._optionsCb);\n }\n\n start(tracer, tracerImp) {\n this._tracer = tracer;\n }\n\n stop() {\n this._tracer.removeListener('options', this._optionsCb);\n }\n\n _handleOptions(modified, current, tracerImp) {\n let enabled = current.log_to_console;\n if (this._enabled === enabled) {\n return;\n }\n this._enabled = enabled;\n if (this._enabled) {\n tracerImp.on('log_added', this._logAddedCb);\n } else {\n tracerImp.removeListener('log_added', this._logAddedCb);\n }\n }\n\n _handleLogAdded(record) {\n let level = constants.LOG_STRING_TO_LEVEL[record.level];\n let message = record.message;\n\n // Ignore records without a message (e.g. a stable_name log record)\n if (!message) {\n return;\n }\n\n let payload = record.payload_json;\n if (payload) {\n try {\n payload = JSON.parse(payload);\n } catch (_ignored) { /* ignored */ }\n }\n\n switch (level) {\n case constants.LOG_ERROR:\n case constants.LOG_FATAL:\n if (payload !== undefined) {\n console.error(message, payload); // eslint-disable-line no-console\n } else {\n console.error(message); // eslint-disable-line no-console\n }\n break;\n case constants.LOG_WARN:\n if (payload !== undefined) {\n console.warn(message, payload); // eslint-disable-line no-console\n } else {\n console.warn(message); // eslint-disable-line no-console\n }\n break;\n case constants.LOG_INFO:\n default:\n if (payload !== undefined) {\n console.log(message, payload); // eslint-disable-line no-console\n } else {\n console.log(message); // eslint-disable-line no-console\n }\n break;\n }\n }\n}\n\nmodule.exports = new LogToConsole();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/lightstep-tracer.min.js b/dist/lightstep-tracer.min.js index c60d69e5..90436ef3 100644 --- a/dist/lightstep-tracer.min.js +++ b/dist/lightstep-tracer.min.js @@ -1,8 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.lightstep=t():e.lightstep=t()}(window,function(){return function(e){var t={};function o(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(r,i,function(t){return e[t]}.bind(null,i));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=21)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)return;for(var o in e)hasOwnProperty.call(e,o)&&t(e[o],o)},e.exports=t.default},function(e,t,o){"use strict";e.exports={Platform:o(32),ThriftTransport:o(37),ProtoTransport:o(38),thrift:o(46),crouton_thrift:o(47),proto:o(2)}},function(e,t,o){"use strict";var r=o(6),i=r,n=Function("return this")(),s=o(10);o(43);i.exportSymbol("proto.lightstep.collector.Auth",null,n),i.exportSymbol("proto.lightstep.collector.Command",null,n),i.exportSymbol("proto.lightstep.collector.InternalMetrics",null,n),i.exportSymbol("proto.lightstep.collector.KeyValue",null,n),i.exportSymbol("proto.lightstep.collector.Log",null,n),i.exportSymbol("proto.lightstep.collector.MetricsSample",null,n),i.exportSymbol("proto.lightstep.collector.Reference",null,n),i.exportSymbol("proto.lightstep.collector.Reference.Relationship",null,n),i.exportSymbol("proto.lightstep.collector.ReportRequest",null,n),i.exportSymbol("proto.lightstep.collector.ReportResponse",null,n),i.exportSymbol("proto.lightstep.collector.Reporter",null,n),i.exportSymbol("proto.lightstep.collector.Span",null,n),i.exportSymbol("proto.lightstep.collector.SpanContext",null,n),proto.lightstep.collector.SpanContext=function(e){r.Message.initialize(this,e,0,-1,null,null)},i.inherits(proto.lightstep.collector.SpanContext,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.SpanContext.displayName="proto.lightstep.collector.SpanContext"),r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.SpanContext.prototype.toObject=function(e){return proto.lightstep.collector.SpanContext.toObject(e,this)},proto.lightstep.collector.SpanContext.toObject=function(e,t){var o,i={traceId:r.Message.getFieldWithDefault(t,1,0),spanId:r.Message.getFieldWithDefault(t,2,0),baggageMap:(o=t.getBaggageMap())?o.toObject(e,void 0):[]};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.SpanContext.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.SpanContext;return proto.lightstep.collector.SpanContext.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.SpanContext.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readUint64();e.setTraceId(o);break;case 2:o=t.readUint64();e.setSpanId(o);break;case 3:o=e.getBaggageMap();t.readMessage(o,function(e,t){r.Map.deserializeBinary(e,t,r.BinaryReader.prototype.readString,r.BinaryReader.prototype.readString,null,"")});break;default:t.skipField()}}return e},proto.lightstep.collector.SpanContext.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.SpanContext.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.SpanContext.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getTraceId())&&t.writeUint64(1,o),0!==(o=e.getSpanId())&&t.writeUint64(2,o),(o=e.getBaggageMap(!0))&&o.getLength()>0&&o.serializeBinary(3,t,r.BinaryWriter.prototype.writeString,r.BinaryWriter.prototype.writeString)},proto.lightstep.collector.SpanContext.prototype.getTraceId=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.lightstep.collector.SpanContext.prototype.setTraceId=function(e){r.Message.setProto3IntField(this,1,e)},proto.lightstep.collector.SpanContext.prototype.getSpanId=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.lightstep.collector.SpanContext.prototype.setSpanId=function(e){r.Message.setProto3IntField(this,2,e)},proto.lightstep.collector.SpanContext.prototype.getBaggageMap=function(e){return r.Message.getMapField(this,3,e,null)},proto.lightstep.collector.SpanContext.prototype.clearBaggageMap=function(){this.getBaggageMap().clear()},proto.lightstep.collector.KeyValue=function(e){r.Message.initialize(this,e,0,-1,null,proto.lightstep.collector.KeyValue.oneofGroups_)},i.inherits(proto.lightstep.collector.KeyValue,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.KeyValue.displayName="proto.lightstep.collector.KeyValue"),proto.lightstep.collector.KeyValue.oneofGroups_=[[2,3,4,5,6]],proto.lightstep.collector.KeyValue.ValueCase={VALUE_NOT_SET:0,STRING_VALUE:2,INT_VALUE:3,DOUBLE_VALUE:4,BOOL_VALUE:5,JSON_VALUE:6},proto.lightstep.collector.KeyValue.prototype.getValueCase=function(){return r.Message.computeOneofCase(this,proto.lightstep.collector.KeyValue.oneofGroups_[0])},r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.KeyValue.prototype.toObject=function(e){return proto.lightstep.collector.KeyValue.toObject(e,this)},proto.lightstep.collector.KeyValue.toObject=function(e,t){var o={key:r.Message.getFieldWithDefault(t,1,""),stringValue:r.Message.getFieldWithDefault(t,2,""),intValue:r.Message.getFieldWithDefault(t,3,0),doubleValue:+r.Message.getFieldWithDefault(t,4,0),boolValue:r.Message.getFieldWithDefault(t,5,!1),jsonValue:r.Message.getFieldWithDefault(t,6,"")};return e&&(o.$jspbMessageInstance=t),o}),proto.lightstep.collector.KeyValue.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.KeyValue;return proto.lightstep.collector.KeyValue.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.KeyValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readString();e.setKey(o);break;case 2:o=t.readString();e.setStringValue(o);break;case 3:o=t.readInt64();e.setIntValue(o);break;case 4:o=t.readDouble();e.setDoubleValue(o);break;case 5:o=t.readBool();e.setBoolValue(o);break;case 6:o=t.readString();e.setJsonValue(o);break;default:t.skipField()}}return e},proto.lightstep.collector.KeyValue.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.KeyValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.KeyValue.serializeBinaryToWriter=function(e,t){var o=void 0;(o=e.getKey()).length>0&&t.writeString(1,o),null!=(o=r.Message.getField(e,2))&&t.writeString(2,o),null!=(o=r.Message.getField(e,3))&&t.writeInt64(3,o),null!=(o=r.Message.getField(e,4))&&t.writeDouble(4,o),null!=(o=r.Message.getField(e,5))&&t.writeBool(5,o),null!=(o=r.Message.getField(e,6))&&t.writeString(6,o)},proto.lightstep.collector.KeyValue.prototype.getKey=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.lightstep.collector.KeyValue.prototype.setKey=function(e){r.Message.setProto3StringField(this,1,e)},proto.lightstep.collector.KeyValue.prototype.getStringValue=function(){return r.Message.getFieldWithDefault(this,2,"")},proto.lightstep.collector.KeyValue.prototype.setStringValue=function(e){r.Message.setOneofField(this,2,proto.lightstep.collector.KeyValue.oneofGroups_[0],e)},proto.lightstep.collector.KeyValue.prototype.clearStringValue=function(){r.Message.setOneofField(this,2,proto.lightstep.collector.KeyValue.oneofGroups_[0],void 0)},proto.lightstep.collector.KeyValue.prototype.hasStringValue=function(){return null!=r.Message.getField(this,2)},proto.lightstep.collector.KeyValue.prototype.getIntValue=function(){return r.Message.getFieldWithDefault(this,3,0)},proto.lightstep.collector.KeyValue.prototype.setIntValue=function(e){r.Message.setOneofField(this,3,proto.lightstep.collector.KeyValue.oneofGroups_[0],e)},proto.lightstep.collector.KeyValue.prototype.clearIntValue=function(){r.Message.setOneofField(this,3,proto.lightstep.collector.KeyValue.oneofGroups_[0],void 0)},proto.lightstep.collector.KeyValue.prototype.hasIntValue=function(){return null!=r.Message.getField(this,3)},proto.lightstep.collector.KeyValue.prototype.getDoubleValue=function(){return+r.Message.getFieldWithDefault(this,4,0)},proto.lightstep.collector.KeyValue.prototype.setDoubleValue=function(e){r.Message.setOneofField(this,4,proto.lightstep.collector.KeyValue.oneofGroups_[0],e)},proto.lightstep.collector.KeyValue.prototype.clearDoubleValue=function(){r.Message.setOneofField(this,4,proto.lightstep.collector.KeyValue.oneofGroups_[0],void 0)},proto.lightstep.collector.KeyValue.prototype.hasDoubleValue=function(){return null!=r.Message.getField(this,4)},proto.lightstep.collector.KeyValue.prototype.getBoolValue=function(){return r.Message.getFieldWithDefault(this,5,!1)},proto.lightstep.collector.KeyValue.prototype.setBoolValue=function(e){r.Message.setOneofField(this,5,proto.lightstep.collector.KeyValue.oneofGroups_[0],e)},proto.lightstep.collector.KeyValue.prototype.clearBoolValue=function(){r.Message.setOneofField(this,5,proto.lightstep.collector.KeyValue.oneofGroups_[0],void 0)},proto.lightstep.collector.KeyValue.prototype.hasBoolValue=function(){return null!=r.Message.getField(this,5)},proto.lightstep.collector.KeyValue.prototype.getJsonValue=function(){return r.Message.getFieldWithDefault(this,6,"")},proto.lightstep.collector.KeyValue.prototype.setJsonValue=function(e){r.Message.setOneofField(this,6,proto.lightstep.collector.KeyValue.oneofGroups_[0],e)},proto.lightstep.collector.KeyValue.prototype.clearJsonValue=function(){r.Message.setOneofField(this,6,proto.lightstep.collector.KeyValue.oneofGroups_[0],void 0)},proto.lightstep.collector.KeyValue.prototype.hasJsonValue=function(){return null!=r.Message.getField(this,6)},proto.lightstep.collector.Log=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.Log.repeatedFields_,null)},i.inherits(proto.lightstep.collector.Log,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Log.displayName="proto.lightstep.collector.Log"),proto.lightstep.collector.Log.repeatedFields_=[2],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Log.prototype.toObject=function(e){return proto.lightstep.collector.Log.toObject(e,this)},proto.lightstep.collector.Log.toObject=function(e,t){var o,i={timestamp:(o=t.getTimestamp())&&s.Timestamp.toObject(e,o),fieldsList:r.Message.toObjectList(t.getFieldsList(),proto.lightstep.collector.KeyValue.toObject,e)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.Log.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Log;return proto.lightstep.collector.Log.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Log.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new s.Timestamp;t.readMessage(o,s.Timestamp.deserializeBinaryFromReader),e.setTimestamp(o);break;case 2:o=new proto.lightstep.collector.KeyValue;t.readMessage(o,proto.lightstep.collector.KeyValue.deserializeBinaryFromReader),e.addFields(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Log.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Log.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Log.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getTimestamp())&&t.writeMessage(1,o,s.Timestamp.serializeBinaryToWriter),(o=e.getFieldsList()).length>0&&t.writeRepeatedMessage(2,o,proto.lightstep.collector.KeyValue.serializeBinaryToWriter)},proto.lightstep.collector.Log.prototype.getTimestamp=function(){return r.Message.getWrapperField(this,s.Timestamp,1)},proto.lightstep.collector.Log.prototype.setTimestamp=function(e){r.Message.setWrapperField(this,1,e)},proto.lightstep.collector.Log.prototype.clearTimestamp=function(){this.setTimestamp(void 0)},proto.lightstep.collector.Log.prototype.hasTimestamp=function(){return null!=r.Message.getField(this,1)},proto.lightstep.collector.Log.prototype.getFieldsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.KeyValue,2)},proto.lightstep.collector.Log.prototype.setFieldsList=function(e){r.Message.setRepeatedWrapperField(this,2,e)},proto.lightstep.collector.Log.prototype.addFields=function(e,t){return r.Message.addToRepeatedWrapperField(this,2,e,proto.lightstep.collector.KeyValue,t)},proto.lightstep.collector.Log.prototype.clearFieldsList=function(){this.setFieldsList([])},proto.lightstep.collector.Reference=function(e){r.Message.initialize(this,e,0,-1,null,null)},i.inherits(proto.lightstep.collector.Reference,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Reference.displayName="proto.lightstep.collector.Reference"),r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Reference.prototype.toObject=function(e){return proto.lightstep.collector.Reference.toObject(e,this)},proto.lightstep.collector.Reference.toObject=function(e,t){var o,i={relationship:r.Message.getFieldWithDefault(t,1,0),spanContext:(o=t.getSpanContext())&&proto.lightstep.collector.SpanContext.toObject(e,o)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.Reference.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Reference;return proto.lightstep.collector.Reference.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Reference.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readEnum();e.setRelationship(o);break;case 2:o=new proto.lightstep.collector.SpanContext;t.readMessage(o,proto.lightstep.collector.SpanContext.deserializeBinaryFromReader),e.setSpanContext(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Reference.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Reference.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Reference.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getRelationship())&&t.writeEnum(1,o),null!=(o=e.getSpanContext())&&t.writeMessage(2,o,proto.lightstep.collector.SpanContext.serializeBinaryToWriter)},proto.lightstep.collector.Reference.Relationship={CHILD_OF:0,FOLLOWS_FROM:1},proto.lightstep.collector.Reference.prototype.getRelationship=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.lightstep.collector.Reference.prototype.setRelationship=function(e){r.Message.setProto3EnumField(this,1,e)},proto.lightstep.collector.Reference.prototype.getSpanContext=function(){return r.Message.getWrapperField(this,proto.lightstep.collector.SpanContext,2)},proto.lightstep.collector.Reference.prototype.setSpanContext=function(e){r.Message.setWrapperField(this,2,e)},proto.lightstep.collector.Reference.prototype.clearSpanContext=function(){this.setSpanContext(void 0)},proto.lightstep.collector.Reference.prototype.hasSpanContext=function(){return null!=r.Message.getField(this,2)},proto.lightstep.collector.Span=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.Span.repeatedFields_,null)},i.inherits(proto.lightstep.collector.Span,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Span.displayName="proto.lightstep.collector.Span"),proto.lightstep.collector.Span.repeatedFields_=[3,6,7],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Span.prototype.toObject=function(e){return proto.lightstep.collector.Span.toObject(e,this)},proto.lightstep.collector.Span.toObject=function(e,t){var o,i={spanContext:(o=t.getSpanContext())&&proto.lightstep.collector.SpanContext.toObject(e,o),operationName:r.Message.getFieldWithDefault(t,2,""),referencesList:r.Message.toObjectList(t.getReferencesList(),proto.lightstep.collector.Reference.toObject,e),startTimestamp:(o=t.getStartTimestamp())&&s.Timestamp.toObject(e,o),durationMicros:r.Message.getFieldWithDefault(t,5,0),tagsList:r.Message.toObjectList(t.getTagsList(),proto.lightstep.collector.KeyValue.toObject,e),logsList:r.Message.toObjectList(t.getLogsList(),proto.lightstep.collector.Log.toObject,e)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.Span.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Span;return proto.lightstep.collector.Span.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Span.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.lightstep.collector.SpanContext;t.readMessage(o,proto.lightstep.collector.SpanContext.deserializeBinaryFromReader),e.setSpanContext(o);break;case 2:o=t.readString();e.setOperationName(o);break;case 3:o=new proto.lightstep.collector.Reference;t.readMessage(o,proto.lightstep.collector.Reference.deserializeBinaryFromReader),e.addReferences(o);break;case 4:o=new s.Timestamp;t.readMessage(o,s.Timestamp.deserializeBinaryFromReader),e.setStartTimestamp(o);break;case 5:o=t.readUint64();e.setDurationMicros(o);break;case 6:o=new proto.lightstep.collector.KeyValue;t.readMessage(o,proto.lightstep.collector.KeyValue.deserializeBinaryFromReader),e.addTags(o);break;case 7:o=new proto.lightstep.collector.Log;t.readMessage(o,proto.lightstep.collector.Log.deserializeBinaryFromReader),e.addLogs(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Span.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Span.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Span.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getSpanContext())&&t.writeMessage(1,o,proto.lightstep.collector.SpanContext.serializeBinaryToWriter),(o=e.getOperationName()).length>0&&t.writeString(2,o),(o=e.getReferencesList()).length>0&&t.writeRepeatedMessage(3,o,proto.lightstep.collector.Reference.serializeBinaryToWriter),null!=(o=e.getStartTimestamp())&&t.writeMessage(4,o,s.Timestamp.serializeBinaryToWriter),0!==(o=e.getDurationMicros())&&t.writeUint64(5,o),(o=e.getTagsList()).length>0&&t.writeRepeatedMessage(6,o,proto.lightstep.collector.KeyValue.serializeBinaryToWriter),(o=e.getLogsList()).length>0&&t.writeRepeatedMessage(7,o,proto.lightstep.collector.Log.serializeBinaryToWriter)},proto.lightstep.collector.Span.prototype.getSpanContext=function(){return r.Message.getWrapperField(this,proto.lightstep.collector.SpanContext,1)},proto.lightstep.collector.Span.prototype.setSpanContext=function(e){r.Message.setWrapperField(this,1,e)},proto.lightstep.collector.Span.prototype.clearSpanContext=function(){this.setSpanContext(void 0)},proto.lightstep.collector.Span.prototype.hasSpanContext=function(){return null!=r.Message.getField(this,1)},proto.lightstep.collector.Span.prototype.getOperationName=function(){return r.Message.getFieldWithDefault(this,2,"")},proto.lightstep.collector.Span.prototype.setOperationName=function(e){r.Message.setProto3StringField(this,2,e)},proto.lightstep.collector.Span.prototype.getReferencesList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.Reference,3)},proto.lightstep.collector.Span.prototype.setReferencesList=function(e){r.Message.setRepeatedWrapperField(this,3,e)},proto.lightstep.collector.Span.prototype.addReferences=function(e,t){return r.Message.addToRepeatedWrapperField(this,3,e,proto.lightstep.collector.Reference,t)},proto.lightstep.collector.Span.prototype.clearReferencesList=function(){this.setReferencesList([])},proto.lightstep.collector.Span.prototype.getStartTimestamp=function(){return r.Message.getWrapperField(this,s.Timestamp,4)},proto.lightstep.collector.Span.prototype.setStartTimestamp=function(e){r.Message.setWrapperField(this,4,e)},proto.lightstep.collector.Span.prototype.clearStartTimestamp=function(){this.setStartTimestamp(void 0)},proto.lightstep.collector.Span.prototype.hasStartTimestamp=function(){return null!=r.Message.getField(this,4)},proto.lightstep.collector.Span.prototype.getDurationMicros=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.lightstep.collector.Span.prototype.setDurationMicros=function(e){r.Message.setProto3IntField(this,5,e)},proto.lightstep.collector.Span.prototype.getTagsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.KeyValue,6)},proto.lightstep.collector.Span.prototype.setTagsList=function(e){r.Message.setRepeatedWrapperField(this,6,e)},proto.lightstep.collector.Span.prototype.addTags=function(e,t){return r.Message.addToRepeatedWrapperField(this,6,e,proto.lightstep.collector.KeyValue,t)},proto.lightstep.collector.Span.prototype.clearTagsList=function(){this.setTagsList([])},proto.lightstep.collector.Span.prototype.getLogsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.Log,7)},proto.lightstep.collector.Span.prototype.setLogsList=function(e){r.Message.setRepeatedWrapperField(this,7,e)},proto.lightstep.collector.Span.prototype.addLogs=function(e,t){return r.Message.addToRepeatedWrapperField(this,7,e,proto.lightstep.collector.Log,t)},proto.lightstep.collector.Span.prototype.clearLogsList=function(){this.setLogsList([])},proto.lightstep.collector.Reporter=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.Reporter.repeatedFields_,null)},i.inherits(proto.lightstep.collector.Reporter,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Reporter.displayName="proto.lightstep.collector.Reporter"),proto.lightstep.collector.Reporter.repeatedFields_=[4],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Reporter.prototype.toObject=function(e){return proto.lightstep.collector.Reporter.toObject(e,this)},proto.lightstep.collector.Reporter.toObject=function(e,t){var o={reporterId:r.Message.getFieldWithDefault(t,1,0),tagsList:r.Message.toObjectList(t.getTagsList(),proto.lightstep.collector.KeyValue.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),proto.lightstep.collector.Reporter.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Reporter;return proto.lightstep.collector.Reporter.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Reporter.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readUint64();e.setReporterId(o);break;case 4:o=new proto.lightstep.collector.KeyValue;t.readMessage(o,proto.lightstep.collector.KeyValue.deserializeBinaryFromReader),e.addTags(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Reporter.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Reporter.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Reporter.serializeBinaryToWriter=function(e,t){var o=void 0;0!==(o=e.getReporterId())&&t.writeUint64(1,o),(o=e.getTagsList()).length>0&&t.writeRepeatedMessage(4,o,proto.lightstep.collector.KeyValue.serializeBinaryToWriter)},proto.lightstep.collector.Reporter.prototype.getReporterId=function(){return r.Message.getFieldWithDefault(this,1,0)},proto.lightstep.collector.Reporter.prototype.setReporterId=function(e){r.Message.setProto3IntField(this,1,e)},proto.lightstep.collector.Reporter.prototype.getTagsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.KeyValue,4)},proto.lightstep.collector.Reporter.prototype.setTagsList=function(e){r.Message.setRepeatedWrapperField(this,4,e)},proto.lightstep.collector.Reporter.prototype.addTags=function(e,t){return r.Message.addToRepeatedWrapperField(this,4,e,proto.lightstep.collector.KeyValue,t)},proto.lightstep.collector.Reporter.prototype.clearTagsList=function(){this.setTagsList([])},proto.lightstep.collector.MetricsSample=function(e){r.Message.initialize(this,e,0,-1,null,proto.lightstep.collector.MetricsSample.oneofGroups_)},i.inherits(proto.lightstep.collector.MetricsSample,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.MetricsSample.displayName="proto.lightstep.collector.MetricsSample"),proto.lightstep.collector.MetricsSample.oneofGroups_=[[2,3]],proto.lightstep.collector.MetricsSample.ValueCase={VALUE_NOT_SET:0,INT_VALUE:2,DOUBLE_VALUE:3},proto.lightstep.collector.MetricsSample.prototype.getValueCase=function(){return r.Message.computeOneofCase(this,proto.lightstep.collector.MetricsSample.oneofGroups_[0])},r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.MetricsSample.prototype.toObject=function(e){return proto.lightstep.collector.MetricsSample.toObject(e,this)},proto.lightstep.collector.MetricsSample.toObject=function(e,t){var o={name:r.Message.getFieldWithDefault(t,1,""),intValue:r.Message.getFieldWithDefault(t,2,0),doubleValue:+r.Message.getFieldWithDefault(t,3,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.lightstep.collector.MetricsSample.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.MetricsSample;return proto.lightstep.collector.MetricsSample.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.MetricsSample.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readString();e.setName(o);break;case 2:o=t.readInt64();e.setIntValue(o);break;case 3:o=t.readDouble();e.setDoubleValue(o);break;default:t.skipField()}}return e},proto.lightstep.collector.MetricsSample.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.MetricsSample.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.MetricsSample.serializeBinaryToWriter=function(e,t){var o=void 0;(o=e.getName()).length>0&&t.writeString(1,o),null!=(o=r.Message.getField(e,2))&&t.writeInt64(2,o),null!=(o=r.Message.getField(e,3))&&t.writeDouble(3,o)},proto.lightstep.collector.MetricsSample.prototype.getName=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.lightstep.collector.MetricsSample.prototype.setName=function(e){r.Message.setProto3StringField(this,1,e)},proto.lightstep.collector.MetricsSample.prototype.getIntValue=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.lightstep.collector.MetricsSample.prototype.setIntValue=function(e){r.Message.setOneofField(this,2,proto.lightstep.collector.MetricsSample.oneofGroups_[0],e)},proto.lightstep.collector.MetricsSample.prototype.clearIntValue=function(){r.Message.setOneofField(this,2,proto.lightstep.collector.MetricsSample.oneofGroups_[0],void 0)},proto.lightstep.collector.MetricsSample.prototype.hasIntValue=function(){return null!=r.Message.getField(this,2)},proto.lightstep.collector.MetricsSample.prototype.getDoubleValue=function(){return+r.Message.getFieldWithDefault(this,3,0)},proto.lightstep.collector.MetricsSample.prototype.setDoubleValue=function(e){r.Message.setOneofField(this,3,proto.lightstep.collector.MetricsSample.oneofGroups_[0],e)},proto.lightstep.collector.MetricsSample.prototype.clearDoubleValue=function(){r.Message.setOneofField(this,3,proto.lightstep.collector.MetricsSample.oneofGroups_[0],void 0)},proto.lightstep.collector.MetricsSample.prototype.hasDoubleValue=function(){return null!=r.Message.getField(this,3)},proto.lightstep.collector.InternalMetrics=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.InternalMetrics.repeatedFields_,null)},i.inherits(proto.lightstep.collector.InternalMetrics,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.InternalMetrics.displayName="proto.lightstep.collector.InternalMetrics"),proto.lightstep.collector.InternalMetrics.repeatedFields_=[3,4,5],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.InternalMetrics.prototype.toObject=function(e){return proto.lightstep.collector.InternalMetrics.toObject(e,this)},proto.lightstep.collector.InternalMetrics.toObject=function(e,t){var o,i={startTimestamp:(o=t.getStartTimestamp())&&s.Timestamp.toObject(e,o),durationMicros:r.Message.getFieldWithDefault(t,2,0),logsList:r.Message.toObjectList(t.getLogsList(),proto.lightstep.collector.Log.toObject,e),countsList:r.Message.toObjectList(t.getCountsList(),proto.lightstep.collector.MetricsSample.toObject,e),gaugesList:r.Message.toObjectList(t.getGaugesList(),proto.lightstep.collector.MetricsSample.toObject,e)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.InternalMetrics.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.InternalMetrics;return proto.lightstep.collector.InternalMetrics.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.InternalMetrics.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new s.Timestamp;t.readMessage(o,s.Timestamp.deserializeBinaryFromReader),e.setStartTimestamp(o);break;case 2:o=t.readUint64();e.setDurationMicros(o);break;case 3:o=new proto.lightstep.collector.Log;t.readMessage(o,proto.lightstep.collector.Log.deserializeBinaryFromReader),e.addLogs(o);break;case 4:o=new proto.lightstep.collector.MetricsSample;t.readMessage(o,proto.lightstep.collector.MetricsSample.deserializeBinaryFromReader),e.addCounts(o);break;case 5:o=new proto.lightstep.collector.MetricsSample;t.readMessage(o,proto.lightstep.collector.MetricsSample.deserializeBinaryFromReader),e.addGauges(o);break;default:t.skipField()}}return e},proto.lightstep.collector.InternalMetrics.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.InternalMetrics.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.InternalMetrics.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getStartTimestamp())&&t.writeMessage(1,o,s.Timestamp.serializeBinaryToWriter),0!==(o=e.getDurationMicros())&&t.writeUint64(2,o),(o=e.getLogsList()).length>0&&t.writeRepeatedMessage(3,o,proto.lightstep.collector.Log.serializeBinaryToWriter),(o=e.getCountsList()).length>0&&t.writeRepeatedMessage(4,o,proto.lightstep.collector.MetricsSample.serializeBinaryToWriter),(o=e.getGaugesList()).length>0&&t.writeRepeatedMessage(5,o,proto.lightstep.collector.MetricsSample.serializeBinaryToWriter)},proto.lightstep.collector.InternalMetrics.prototype.getStartTimestamp=function(){return r.Message.getWrapperField(this,s.Timestamp,1)},proto.lightstep.collector.InternalMetrics.prototype.setStartTimestamp=function(e){r.Message.setWrapperField(this,1,e)},proto.lightstep.collector.InternalMetrics.prototype.clearStartTimestamp=function(){this.setStartTimestamp(void 0)},proto.lightstep.collector.InternalMetrics.prototype.hasStartTimestamp=function(){return null!=r.Message.getField(this,1)},proto.lightstep.collector.InternalMetrics.prototype.getDurationMicros=function(){return r.Message.getFieldWithDefault(this,2,0)},proto.lightstep.collector.InternalMetrics.prototype.setDurationMicros=function(e){r.Message.setProto3IntField(this,2,e)},proto.lightstep.collector.InternalMetrics.prototype.getLogsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.Log,3)},proto.lightstep.collector.InternalMetrics.prototype.setLogsList=function(e){r.Message.setRepeatedWrapperField(this,3,e)},proto.lightstep.collector.InternalMetrics.prototype.addLogs=function(e,t){return r.Message.addToRepeatedWrapperField(this,3,e,proto.lightstep.collector.Log,t)},proto.lightstep.collector.InternalMetrics.prototype.clearLogsList=function(){this.setLogsList([])},proto.lightstep.collector.InternalMetrics.prototype.getCountsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.MetricsSample,4)},proto.lightstep.collector.InternalMetrics.prototype.setCountsList=function(e){r.Message.setRepeatedWrapperField(this,4,e)},proto.lightstep.collector.InternalMetrics.prototype.addCounts=function(e,t){return r.Message.addToRepeatedWrapperField(this,4,e,proto.lightstep.collector.MetricsSample,t)},proto.lightstep.collector.InternalMetrics.prototype.clearCountsList=function(){this.setCountsList([])},proto.lightstep.collector.InternalMetrics.prototype.getGaugesList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.MetricsSample,5)},proto.lightstep.collector.InternalMetrics.prototype.setGaugesList=function(e){r.Message.setRepeatedWrapperField(this,5,e)},proto.lightstep.collector.InternalMetrics.prototype.addGauges=function(e,t){return r.Message.addToRepeatedWrapperField(this,5,e,proto.lightstep.collector.MetricsSample,t)},proto.lightstep.collector.InternalMetrics.prototype.clearGaugesList=function(){this.setGaugesList([])},proto.lightstep.collector.Auth=function(e){r.Message.initialize(this,e,0,-1,null,null)},i.inherits(proto.lightstep.collector.Auth,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Auth.displayName="proto.lightstep.collector.Auth"),r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Auth.prototype.toObject=function(e){return proto.lightstep.collector.Auth.toObject(e,this)},proto.lightstep.collector.Auth.toObject=function(e,t){var o={accessToken:r.Message.getFieldWithDefault(t,1,"")};return e&&(o.$jspbMessageInstance=t),o}),proto.lightstep.collector.Auth.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Auth;return proto.lightstep.collector.Auth.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Auth.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readString();e.setAccessToken(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Auth.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Auth.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Auth.serializeBinaryToWriter=function(e,t){var o;(o=e.getAccessToken()).length>0&&t.writeString(1,o)},proto.lightstep.collector.Auth.prototype.getAccessToken=function(){return r.Message.getFieldWithDefault(this,1,"")},proto.lightstep.collector.Auth.prototype.setAccessToken=function(e){r.Message.setProto3StringField(this,1,e)},proto.lightstep.collector.ReportRequest=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.ReportRequest.repeatedFields_,null)},i.inherits(proto.lightstep.collector.ReportRequest,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.ReportRequest.displayName="proto.lightstep.collector.ReportRequest"),proto.lightstep.collector.ReportRequest.repeatedFields_=[3],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.ReportRequest.prototype.toObject=function(e){return proto.lightstep.collector.ReportRequest.toObject(e,this)},proto.lightstep.collector.ReportRequest.toObject=function(e,t){var o,i={reporter:(o=t.getReporter())&&proto.lightstep.collector.Reporter.toObject(e,o),auth:(o=t.getAuth())&&proto.lightstep.collector.Auth.toObject(e,o),spansList:r.Message.toObjectList(t.getSpansList(),proto.lightstep.collector.Span.toObject,e),timestampOffsetMicros:r.Message.getFieldWithDefault(t,5,0),internalMetrics:(o=t.getInternalMetrics())&&proto.lightstep.collector.InternalMetrics.toObject(e,o)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.ReportRequest.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.ReportRequest;return proto.lightstep.collector.ReportRequest.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.ReportRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.lightstep.collector.Reporter;t.readMessage(o,proto.lightstep.collector.Reporter.deserializeBinaryFromReader),e.setReporter(o);break;case 2:o=new proto.lightstep.collector.Auth;t.readMessage(o,proto.lightstep.collector.Auth.deserializeBinaryFromReader),e.setAuth(o);break;case 3:o=new proto.lightstep.collector.Span;t.readMessage(o,proto.lightstep.collector.Span.deserializeBinaryFromReader),e.addSpans(o);break;case 5:o=t.readInt64();e.setTimestampOffsetMicros(o);break;case 6:o=new proto.lightstep.collector.InternalMetrics;t.readMessage(o,proto.lightstep.collector.InternalMetrics.deserializeBinaryFromReader),e.setInternalMetrics(o);break;default:t.skipField()}}return e},proto.lightstep.collector.ReportRequest.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.ReportRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.ReportRequest.serializeBinaryToWriter=function(e,t){var o=void 0;null!=(o=e.getReporter())&&t.writeMessage(1,o,proto.lightstep.collector.Reporter.serializeBinaryToWriter),null!=(o=e.getAuth())&&t.writeMessage(2,o,proto.lightstep.collector.Auth.serializeBinaryToWriter),(o=e.getSpansList()).length>0&&t.writeRepeatedMessage(3,o,proto.lightstep.collector.Span.serializeBinaryToWriter),0!==(o=e.getTimestampOffsetMicros())&&t.writeInt64(5,o),null!=(o=e.getInternalMetrics())&&t.writeMessage(6,o,proto.lightstep.collector.InternalMetrics.serializeBinaryToWriter)},proto.lightstep.collector.ReportRequest.prototype.getReporter=function(){return r.Message.getWrapperField(this,proto.lightstep.collector.Reporter,1)},proto.lightstep.collector.ReportRequest.prototype.setReporter=function(e){r.Message.setWrapperField(this,1,e)},proto.lightstep.collector.ReportRequest.prototype.clearReporter=function(){this.setReporter(void 0)},proto.lightstep.collector.ReportRequest.prototype.hasReporter=function(){return null!=r.Message.getField(this,1)},proto.lightstep.collector.ReportRequest.prototype.getAuth=function(){return r.Message.getWrapperField(this,proto.lightstep.collector.Auth,2)},proto.lightstep.collector.ReportRequest.prototype.setAuth=function(e){r.Message.setWrapperField(this,2,e)},proto.lightstep.collector.ReportRequest.prototype.clearAuth=function(){this.setAuth(void 0)},proto.lightstep.collector.ReportRequest.prototype.hasAuth=function(){return null!=r.Message.getField(this,2)},proto.lightstep.collector.ReportRequest.prototype.getSpansList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.Span,3)},proto.lightstep.collector.ReportRequest.prototype.setSpansList=function(e){r.Message.setRepeatedWrapperField(this,3,e)},proto.lightstep.collector.ReportRequest.prototype.addSpans=function(e,t){return r.Message.addToRepeatedWrapperField(this,3,e,proto.lightstep.collector.Span,t)},proto.lightstep.collector.ReportRequest.prototype.clearSpansList=function(){this.setSpansList([])},proto.lightstep.collector.ReportRequest.prototype.getTimestampOffsetMicros=function(){return r.Message.getFieldWithDefault(this,5,0)},proto.lightstep.collector.ReportRequest.prototype.setTimestampOffsetMicros=function(e){r.Message.setProto3IntField(this,5,e)},proto.lightstep.collector.ReportRequest.prototype.getInternalMetrics=function(){return r.Message.getWrapperField(this,proto.lightstep.collector.InternalMetrics,6)},proto.lightstep.collector.ReportRequest.prototype.setInternalMetrics=function(e){r.Message.setWrapperField(this,6,e)},proto.lightstep.collector.ReportRequest.prototype.clearInternalMetrics=function(){this.setInternalMetrics(void 0)},proto.lightstep.collector.ReportRequest.prototype.hasInternalMetrics=function(){return null!=r.Message.getField(this,6)},proto.lightstep.collector.Command=function(e){r.Message.initialize(this,e,0,-1,null,null)},i.inherits(proto.lightstep.collector.Command,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.Command.displayName="proto.lightstep.collector.Command"),r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.Command.prototype.toObject=function(e){return proto.lightstep.collector.Command.toObject(e,this)},proto.lightstep.collector.Command.toObject=function(e,t){var o={disable:r.Message.getFieldWithDefault(t,1,!1)};return e&&(o.$jspbMessageInstance=t),o}),proto.lightstep.collector.Command.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.Command;return proto.lightstep.collector.Command.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.Command.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=t.readBool();e.setDisable(o);break;default:t.skipField()}}return e},proto.lightstep.collector.Command.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.Command.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.Command.serializeBinaryToWriter=function(e,t){var o;(o=e.getDisable())&&t.writeBool(1,o)},proto.lightstep.collector.Command.prototype.getDisable=function(){return r.Message.getFieldWithDefault(this,1,!1)},proto.lightstep.collector.Command.prototype.setDisable=function(e){r.Message.setProto3BooleanField(this,1,e)},proto.lightstep.collector.ReportResponse=function(e){r.Message.initialize(this,e,0,-1,proto.lightstep.collector.ReportResponse.repeatedFields_,null)},i.inherits(proto.lightstep.collector.ReportResponse,r.Message),i.DEBUG&&!COMPILED&&(proto.lightstep.collector.ReportResponse.displayName="proto.lightstep.collector.ReportResponse"),proto.lightstep.collector.ReportResponse.repeatedFields_=[1,4,5,6],r.Message.GENERATE_TO_OBJECT&&(proto.lightstep.collector.ReportResponse.prototype.toObject=function(e){return proto.lightstep.collector.ReportResponse.toObject(e,this)},proto.lightstep.collector.ReportResponse.toObject=function(e,t){var o,i={commandsList:r.Message.toObjectList(t.getCommandsList(),proto.lightstep.collector.Command.toObject,e),receiveTimestamp:(o=t.getReceiveTimestamp())&&s.Timestamp.toObject(e,o),transmitTimestamp:(o=t.getTransmitTimestamp())&&s.Timestamp.toObject(e,o),errorsList:r.Message.getRepeatedField(t,4),warningsList:r.Message.getRepeatedField(t,5),infosList:r.Message.getRepeatedField(t,6)};return e&&(i.$jspbMessageInstance=t),i}),proto.lightstep.collector.ReportResponse.deserializeBinary=function(e){var t=new r.BinaryReader(e),o=new proto.lightstep.collector.ReportResponse;return proto.lightstep.collector.ReportResponse.deserializeBinaryFromReader(o,t)},proto.lightstep.collector.ReportResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var o=new proto.lightstep.collector.Command;t.readMessage(o,proto.lightstep.collector.Command.deserializeBinaryFromReader),e.addCommands(o);break;case 2:o=new s.Timestamp;t.readMessage(o,s.Timestamp.deserializeBinaryFromReader),e.setReceiveTimestamp(o);break;case 3:o=new s.Timestamp;t.readMessage(o,s.Timestamp.deserializeBinaryFromReader),e.setTransmitTimestamp(o);break;case 4:o=t.readString();e.addErrors(o);break;case 5:o=t.readString();e.addWarnings(o);break;case 6:o=t.readString();e.addInfos(o);break;default:t.skipField()}}return e},proto.lightstep.collector.ReportResponse.prototype.serializeBinary=function(){var e=new r.BinaryWriter;return proto.lightstep.collector.ReportResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.lightstep.collector.ReportResponse.serializeBinaryToWriter=function(e,t){var o=void 0;(o=e.getCommandsList()).length>0&&t.writeRepeatedMessage(1,o,proto.lightstep.collector.Command.serializeBinaryToWriter),null!=(o=e.getReceiveTimestamp())&&t.writeMessage(2,o,s.Timestamp.serializeBinaryToWriter),null!=(o=e.getTransmitTimestamp())&&t.writeMessage(3,o,s.Timestamp.serializeBinaryToWriter),(o=e.getErrorsList()).length>0&&t.writeRepeatedString(4,o),(o=e.getWarningsList()).length>0&&t.writeRepeatedString(5,o),(o=e.getInfosList()).length>0&&t.writeRepeatedString(6,o)},proto.lightstep.collector.ReportResponse.prototype.getCommandsList=function(){return r.Message.getRepeatedWrapperField(this,proto.lightstep.collector.Command,1)},proto.lightstep.collector.ReportResponse.prototype.setCommandsList=function(e){r.Message.setRepeatedWrapperField(this,1,e)},proto.lightstep.collector.ReportResponse.prototype.addCommands=function(e,t){return r.Message.addToRepeatedWrapperField(this,1,e,proto.lightstep.collector.Command,t)},proto.lightstep.collector.ReportResponse.prototype.clearCommandsList=function(){this.setCommandsList([])},proto.lightstep.collector.ReportResponse.prototype.getReceiveTimestamp=function(){return r.Message.getWrapperField(this,s.Timestamp,2)},proto.lightstep.collector.ReportResponse.prototype.setReceiveTimestamp=function(e){r.Message.setWrapperField(this,2,e)},proto.lightstep.collector.ReportResponse.prototype.clearReceiveTimestamp=function(){this.setReceiveTimestamp(void 0)},proto.lightstep.collector.ReportResponse.prototype.hasReceiveTimestamp=function(){return null!=r.Message.getField(this,2)},proto.lightstep.collector.ReportResponse.prototype.getTransmitTimestamp=function(){return r.Message.getWrapperField(this,s.Timestamp,3)},proto.lightstep.collector.ReportResponse.prototype.setTransmitTimestamp=function(e){r.Message.setWrapperField(this,3,e)},proto.lightstep.collector.ReportResponse.prototype.clearTransmitTimestamp=function(){this.setTransmitTimestamp(void 0)},proto.lightstep.collector.ReportResponse.prototype.hasTransmitTimestamp=function(){return null!=r.Message.getField(this,3)},proto.lightstep.collector.ReportResponse.prototype.getErrorsList=function(){return r.Message.getRepeatedField(this,4)},proto.lightstep.collector.ReportResponse.prototype.setErrorsList=function(e){r.Message.setField(this,4,e||[])},proto.lightstep.collector.ReportResponse.prototype.addErrors=function(e,t){r.Message.addToRepeatedField(this,4,e,t)},proto.lightstep.collector.ReportResponse.prototype.clearErrorsList=function(){this.setErrorsList([])},proto.lightstep.collector.ReportResponse.prototype.getWarningsList=function(){return r.Message.getRepeatedField(this,5)},proto.lightstep.collector.ReportResponse.prototype.setWarningsList=function(e){r.Message.setField(this,5,e||[])},proto.lightstep.collector.ReportResponse.prototype.addWarnings=function(e,t){r.Message.addToRepeatedField(this,5,e,t)},proto.lightstep.collector.ReportResponse.prototype.clearWarningsList=function(){this.setWarningsList([])},proto.lightstep.collector.ReportResponse.prototype.getInfosList=function(){return r.Message.getRepeatedField(this,6)},proto.lightstep.collector.ReportResponse.prototype.setInfosList=function(e){r.Message.setField(this,6,e||[])},proto.lightstep.collector.ReportResponse.prototype.addInfos=function(e,t){r.Message.addToRepeatedField(this,6,e,t)},proto.lightstep.collector.ReportResponse.prototype.clearInfosList=function(){this.setInfosList([])},i.object.extend(t,proto.lightstep.collector)},function(e,t,o){"use strict";function r(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});var i=o(24);t.BinaryCarrier=i.default;var n=o(25);t.Tags=n;var s=o(8),a=o(14);t.Reference=a.default;var p=o(5);t.Span=p.default;var g=o(11);t.SpanContext=g.default;var l=o(9);t.Tracer=l.Tracer;var u=o(26);t.MockTracer=u.MockTracer,r(o(29)),r(o(13)),r(o(12)),s.initialize()},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toString=function(e){return""+e},t.toNumber=function(e){return Number(e)},t.toBoolean=function(e){return!!e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(8),i=function(){function e(){}return e.prototype.context=function(){return this._context()},e.prototype.tracer=function(){return this._tracer()},e.prototype.setOperationName=function(e){return this._setOperationName(e),this},e.prototype.setBaggageItem=function(e,t){return this._setBaggageItem(e,t),this},e.prototype.getBaggageItem=function(e){return this._getBaggageItem(e)},e.prototype.setTag=function(e,t){return this._addTags(((o={})[e]=t,o)),this;var o},e.prototype.addTags=function(e){return this._addTags(e),this},e.prototype.log=function(e,t){return this._log(e,t),this},e.prototype.logEvent=function(e,t){return this._log({event:e,payload:t})},e.prototype.finish=function(e){this._finish(e)},e.prototype._context=function(){return r.spanContext},e.prototype._tracer=function(){return r.tracer},e.prototype._setOperationName=function(e){},e.prototype._setBaggageItem=function(e,t){},e.prototype._getBaggageItem=function(e){},e.prototype._addTags=function(e){},e.prototype._log=function(e,t){},e.prototype._finish=function(e){},e}();t.Span=i,t.default=i},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp={scope:{},getGlobal:function(e){return"undefined"!=typeof window&&window===e?e:void 0!==global?global:e}};$jscomp.global=$jscomp.getGlobal(this),$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol),$jscomp.initSymbol=function(){}},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(e){return"jscomp_symbol_"+e+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol(),$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),$jscomp.initSymbolIterator=function(){}},$jscomp.makeIterator=function(e){$jscomp.initSymbolIterator(),$jscomp.initSymbol(),$jscomp.initSymbolIterator();var t=e[Symbol.iterator];if(t)return t.call(e);var o=0;return{next:function(){return ot;)--o in this?this[--e]=this[o]:delete this[e];return this},$jscomp.array.copyWithin$install=function(){$jscomp.array.installHelper_("copyWithin",$jscomp.array.copyWithin)},$jscomp.array.fill=function(e,t,o){var r=this.length||0;for(0>t&&(t=Math.max(0,r+t)),(null==o||o>r)&&(o=r),0>(o=Number(o))&&(o=Math.max(0,r+o)),t=Number(t||0);t>>0))return 32;var t=0;return 0==(4294901760&e)&&(e<<=16,t+=16),0==(4278190080&e)&&(e<<=8,t+=8),0==(4026531840&e)&&(e<<=4,t+=4),0==(3221225472&e)&&(e<<=2,t+=2),0==(2147483648&e)&&t++,t},$jscomp.math.imul=function(e,t){var o=65535&(e=Number(e)),r=65535&(t=Number(t));return o*r+((e>>>16&65535)*r+o*(t>>>16&65535)<<16>>>0)|0},$jscomp.math.sign=function(e){return 0===(e=Number(e))||isNaN(e)?e:0(e=Number(e))&&-.25(e=Number(e))&&-.25e?-t:t},$jscomp.math.acosh=function(e){return e=Number(e),Math.log(e+Math.sqrt(e*e-1))},$jscomp.math.asinh=function(e){if(0===(e=Number(e)))return e;var t=Math.log(Math.abs(e)+Math.sqrt(e*e+1));return 0>e?-t:t},$jscomp.math.atanh=function(e){return e=Number(e),($jscomp.math.log1p(e)-$jscomp.math.log1p(-e))/2},$jscomp.math.hypot=function(e,t,o){e=Number(e),t=Number(t);var r,i,n,s=Math.max(Math.abs(e),Math.abs(t));for(r=2;rs){for(n=(e/=s)*e+(t/=s)*t,r=2;re?-t:t},$jscomp.math.cbrt=function(e){if(0===e)return e;e=Number(e);var t=Math.pow(Math.abs(e),1/3);return 0>e?-t:t},$jscomp.number=$jscomp.number||{},$jscomp.number.isFinite=function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)},$jscomp.number.isInteger=function(e){return!!$jscomp.number.isFinite(e)&&e===Math.floor(e)},$jscomp.number.isNaN=function(e){return"number"==typeof e&&isNaN(e)},$jscomp.number.isSafeInteger=function(e){return $jscomp.number.isInteger(e)&&Math.abs(e)<=$jscomp.number.MAX_SAFE_INTEGER},$jscomp.number.EPSILON=Math.pow(2,-52),$jscomp.number.MAX_SAFE_INTEGER=9007199254740991,$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991,$jscomp.object=$jscomp.object||{},$jscomp.object.assign=function(e,t){for(var o=1;or||1114111=r?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(r>>>10&1023|55296),t+=String.fromCharCode(1023&r|56320))}return t},$jscomp.string.repeat=function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return o},$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)},$jscomp.string.codePointAt=function(e){var t=$jscomp.checkStringArgs(this,null,"codePointAt"),o=t.length;if(0<=(e=Number(e)||0)&&er||56319(e=t.charCodeAt(e+1))||57343=i},$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)},$jscomp.string.endsWith=function(e,t){var o=$jscomp.checkStringArgs(this,e,"endsWith");e+="",void 0===t&&(t=o.length);for(var r=Math.max(0,Math.min(0|t,o.length)),i=e.length;0=i},$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)};var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(e){return void 0!==e},goog.exportPath_=function(e,t,o){e=e.split("."),o=o||goog.global,e[0]in o||!o.execScript||o.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)!e.length&&goog.isDef(t)?o[r]=t:o=o[r]?o[r]:o[r]={}},goog.define=function(e,t){var o=t;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,e)?o=goog.global.CLOSURE_UNCOMPILED_DEFINES[e]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,e)&&(o=goog.global.CLOSURE_DEFINES[e])),goog.exportPath_(e,o)},goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var o=e;(o=o.substring(0,o.lastIndexOf(".")))&&!goog.getObjectByName(o);)goog.implicitNamespaces_[o]=!0}goog.exportPath_(e,t)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED)return goog.isProvided_(e)?e in goog.loadedModules_?goog.loadedModules_[e]:goog.getObjectByName(e):null},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){for(var o,r=e.split("."),i=t||goog.global;o=r.shift();){if(!goog.isDefAndNotNull(i[o]))return null;i=i[o]}return i},goog.globalize=function(e,t){var o,r=t||goog.global;for(o in e)r[o]=e[o]},goog.addDependency=function(e,t,o,r){if(goog.DEPENDENCIES_ENABLED){var i;e=e.replace(/\\/g,"/");for(var n=goog.dependencies_,s=0;i=t[s];s++)n.nameToPath[i]=e,n.pathIsModule[e]=!!r;for(r=0;t=o[r];r++)e in n.requires||(n.requires[e]={}),n.requires[e][t]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){if(!COMPILED){if(goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(e),goog.isProvided_(e))return goog.isInModuleLoader_()?goog.module.getInternal_(e):null;if(goog.ENABLE_DEBUG_LOADER){var t=goog.getPathFromDeps_(e);if(t)return goog.writeScripts_(t),null}throw e="goog.require could not find: "+e,goog.logToConsole_(e),Error(e)}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER,goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var e=goog.global.document;return null!=e&&"write"in e},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var e=goog.global.document.getElementsByTagName("SCRIPT"),t=e.length-1;0<=t;--t){var o=e[t].src,r=-1==(r=o.lastIndexOf("?"))?o.length:r;if("base.js"==o.substr(r-7,7)){goog.basePath=o.substr(0,r-7);break}}},goog.importScript_=function(e,t){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(e,t)&&(goog.dependencies_.written[e]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(e){goog.importScript_("",'goog.retrieveAndExecModule_("'+e+'");')&&(goog.dependencies_.written[e]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(e,t){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(t+"\n//# sourceURL="+e+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+t+"\n;return exports});\n//# sourceURL="+e+"\n"},goog.loadQueuedModules_=function(){var e=goog.queuedModules_.length;if(0<\/script>')},goog.appendScriptSrcNode_=function(e){var t=goog.global.document,o=t.createElement("script");o.type="text/javascript",o.src=e,o.defer=!1,o.async=!1,t.head.appendChild(o)},goog.writeScriptTag_=function(e,t){if(goog.inHtmlDocument_()){var o=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==o.readyState){if(/\bdeps.js$/.test(e))return!1;throw Error('Cannot write "'+e+'" after document load')}var r=goog.IS_OLD_IE_;return void 0===t?r?(r=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",o.write('